- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Closed
Description
With Boot 2.0.4:
	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-integration</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.integration</groupId>
			<artifactId>spring-integration-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>@SpringBootApplication
public class Igh25431Application {
	public static void main(String[] args) {
		SpringApplication.run(Igh25431Application.class, args);
	}
	@Bean
	public JdbcMessageStore store(DataSource dataSource) {
		return new JdbcMessageStore(dataSource);
	}
}spring.datasource.url=jdbc:mysql://localhost/integration
spring.datasource.username=root
#spring.datasource.password=dbpass
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.integration.jdbc.initialize-schema=always
logging.level.root=debug2018-08-22 14:12:42.704 DEBUG 64743 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Creating shared instance of singleton bean 'store'
2018-08-22 14:12:42.704 DEBUG 64743 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Creating instance of bean 'store'
2018-08-22 14:12:42.704 DEBUG 64743 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2018-08-22 14:12:42.704 DEBUG 64743 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'igh25431Application'
2018-08-22 14:12:42.705 DEBUG 64743 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Creating shared instance of singleton bean 'dataSource'
2018-08-22 14:12:42.705 DEBUG 64743 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Creating instance of bean 'dataSource'
...
2018-08-22 14:12:42.744 DEBUG 64743 --- [           main] com.zaxxer.hikari.HikariConfig           : Driver class com.mysql.jdbc.Driver found in Thread context class loader sun.misc.Launcher$AppClassLoader@764c12b6
...
2018-08-22 14:12:42.765 DEBUG 64743 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Finished creating instance of bean 'dataSource'
   IntegrationAutoConfiguration.IntegrationJdbcConfiguration:
      Did not match:
         - @ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) did not find any beans (OnBeanCondition)
      Matched:
         - @ConditionalOnClass found required class 'org.springframework.integration.jdbc.store.JdbcMessageStore'; @ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
Clearly we have a DataSource but auto config doesn't find it for some reason.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug