use of org.springframework.session.jdbc.config.annotation.SpringSessionDataSource in project spring-session by spring-projects.
the class JdbcHttpSessionConfiguration method setDataSource.
@Autowired
public void setDataSource(@SpringSessionDataSource ObjectProvider<DataSource> springSessionDataSource, ObjectProvider<DataSource> dataSource) {
DataSource dataSourceToUse = springSessionDataSource.getIfAvailable();
if (dataSourceToUse == null) {
dataSourceToUse = dataSource.getObject();
}
this.dataSource = dataSourceToUse;
}
Aggregations