问题如下:
java.lang.IllegalStateException: The following classes could not be excluded because they are not auto-configuration classes:
- org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
解决:
SpringBoot不连接数据库,需要在控制器中 @SpringBootApplication
后exclude = DataSourceAutoConfiguration.class
例如:@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)