Search in sources :

Example 1 with DefaultComponentSerializationPlan

use of org.apereo.cas.util.serialization.DefaultComponentSerializationPlan in project cas by apereo.

the class CasCoreUtilSerializationConfiguration method componentSerializationPlan.

@ConditionalOnMissingBean(name = "componentSerializationPlan")
@Autowired
@Bean
public ComponentSerializationPlan componentSerializationPlan(final List<ComponentSerializationPlanConfigurator> configurers) {
    final DefaultComponentSerializationPlan plan = new DefaultComponentSerializationPlan();
    configurers.forEach(c -> {
        final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
        LOGGER.debug("Configuring component serialization plan [{}]", name);
        c.configureComponentSerializationPlan(plan);
    });
    return plan;
}
Also used : DefaultComponentSerializationPlan(org.apereo.cas.util.serialization.DefaultComponentSerializationPlan) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

DefaultComponentSerializationPlan (org.apereo.cas.util.serialization.DefaultComponentSerializationPlan)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1