Search in sources :

Example 1 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class CasCoreAuthenticationConfiguration method authenticationEventExecutionPlan.

@ConditionalOnMissingBean(name = "authenticationEventExecutionPlan")
@Autowired
@Bean
public AuthenticationEventExecutionPlan authenticationEventExecutionPlan(final List<AuthenticationEventExecutionPlanConfigurer> configurers) {
    final DefaultAuthenticationEventExecutionPlan plan = new DefaultAuthenticationEventExecutionPlan();
    configurers.forEach(c -> {
        final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
        LOGGER.debug("Configuring authentication execution plan [{}]", name);
        c.configureAuthenticationExecutionPlan(plan);
    });
    return plan;
}
Also used : DefaultAuthenticationEventExecutionPlan(org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan) 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)

Example 2 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class CasCoreTicketsConfiguration method ticketCatalog.

@ConditionalOnMissingBean(name = "ticketCatalog")
@Autowired
@Bean
public TicketCatalog ticketCatalog(final List<TicketCatalogConfigurer> configurers) {
    final DefaultTicketCatalog plan = new DefaultTicketCatalog();
    configurers.forEach(c -> {
        final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
        LOGGER.debug("Configuring ticket metadata registration plan [{}]", name);
        c.configureTicketCatalog(plan);
    });
    return plan;
}
Also used : DefaultTicketCatalog(org.apereo.cas.ticket.DefaultTicketCatalog) 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)

Example 3 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class CasCoreConfiguration method authenticationServiceSelectionPlan.

@ConditionalOnMissingBean(name = "authenticationServiceSelectionPlan")
@Autowired
@Bean
public AuthenticationServiceSelectionPlan authenticationServiceSelectionPlan(final List<AuthenticationServiceSelectionStrategyConfigurer> configurers) {
    final DefaultAuthenticationServiceSelectionPlan plan = new DefaultAuthenticationServiceSelectionPlan();
    configurers.forEach(c -> {
        final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
        LOGGER.debug("Configuring authentication request service selection strategy plan [{}]", name);
        c.configureAuthenticationServiceSelectionStrategy(plan);
    });
    return plan;
}
Also used : DefaultAuthenticationServiceSelectionPlan(org.apereo.cas.authentication.DefaultAuthenticationServiceSelectionPlan) 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)

Example 4 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class GoogleAuthenticatorJpaConfiguration method transactionManagerGoogleAuthenticator.

@Autowired
@Bean
public PlatformTransactionManager transactionManagerGoogleAuthenticator(@Qualifier("googleAuthenticatorEntityManagerFactory") final EntityManagerFactory emf) {
    final JpaTransactionManager mgmr = new JpaTransactionManager();
    mgmr.setEntityManagerFactory(emf);
    return mgmr;
}
Also used : JpaTransactionManager(org.springframework.orm.jpa.JpaTransactionManager) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean) LocalContainerEntityManagerFactoryBean(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)

Example 5 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class JpaEventsConfiguration method transactionManagerEvents.

@Autowired
@Bean
public PlatformTransactionManager transactionManagerEvents(@Qualifier("eventsEntityManagerFactory") final EntityManagerFactory emf) {
    final JpaTransactionManager mgmr = new JpaTransactionManager();
    mgmr.setEntityManagerFactory(emf);
    return mgmr;
}
Also used : JpaTransactionManager(org.springframework.orm.jpa.JpaTransactionManager) Autowired(org.springframework.beans.factory.annotation.Autowired) Bean(org.springframework.context.annotation.Bean) LocalContainerEntityManagerFactoryBean(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)

Aggregations

Autowired (org.springframework.beans.factory.annotation.Autowired)38 Bean (org.springframework.context.annotation.Bean)23 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)9 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)5 JpaTransactionManager (org.springframework.orm.jpa.JpaTransactionManager)3 LocalContainerEntityManagerFactoryBean (org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)3 V3ProxyValidateController (org.apereo.cas.web.v3.V3ProxyValidateController)2 V3ServiceValidateController (org.apereo.cas.web.v3.V3ServiceValidateController)2 Logger (org.slf4j.Logger)2 Qualifier (org.springframework.beans.factory.annotation.Qualifier)2 File (java.io.File)1 Constructor (java.lang.reflect.Constructor)1 Executable (java.lang.reflect.Executable)1 Field (java.lang.reflect.Field)1 Parameter (java.lang.reflect.Parameter)1 Properties (java.util.Properties)1 Resource (javax.annotation.Resource)1 Inject (javax.inject.Inject)1 PersistenceConfiguration (net.sf.ehcache.config.PersistenceConfiguration)1 CacheEntryFactory (net.sf.ehcache.constructs.blocking.CacheEntryFactory)1