use of org.springframework.context.annotation.Primary in project dockerunit by qzagarese.
the class AppRunner method loadProperties.
@Bean
@Primary
public Properties loadProperties() throws FileNotFoundException, IOException {
String propsLocation = System.getProperty("properties.location");
Properties props = new Properties();
props.load(new FileReader(new File(propsLocation)));
return props;
}
use of org.springframework.context.annotation.Primary in project tutorials by eugenp.
the class CasSecuredAppApplication method authenticationEntryPoint.
@Bean
@Primary
public AuthenticationEntryPoint authenticationEntryPoint(ServiceProperties sP) {
CasAuthenticationEntryPoint entryPoint = new CasAuthenticationEntryPoint();
entryPoint.setLoginUrl("https://localhost:6443/cas/login");
entryPoint.setServiceProperties(sP);
return entryPoint;
}
use of org.springframework.context.annotation.Primary in project flytecnologia-api by jullierme.
the class FlyHibernateConfig method transactionManager.
@Bean
@Primary
public PlatformTransactionManager transactionManager(EntityManagerFactory emf) {
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(emf);
return transactionManager;
}
use of org.springframework.context.annotation.Primary in project tutorials by eugenp.
the class NotifierConfiguration method remindingNotifier.
@Bean
@Primary
public RemindingNotifier remindingNotifier() {
RemindingNotifier remindingNotifier = new RemindingNotifier(filteringNotifier());
remindingNotifier.setReminderPeriod(TimeUnit.MINUTES.toMillis(5));
return remindingNotifier;
}
use of org.springframework.context.annotation.Primary in project tutorials by eugenp.
the class UserConfig method userTransactionManager.
@Primary
@Bean
public PlatformTransactionManager userTransactionManager() {
final JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(userEntityManager().getObject());
return transactionManager;
}
Aggregations