1
我有这个配置文件:春天开机不读阳明文件DB配置
liquibase:
enabled: true
change-log: classpath:/db/changelog/db.changelog-master.yml
management:
security:
enabled: false
server:
port: 8080
spring:
datasource:
driverClassName: org.h2.Driver
url: jdbc:h2:file:./target/h2db/db/develop;DB_CLOSE_DELAY=-1
username: sa
password:
h2:
console:
enabled: true
当我尝试检查datasorce它连接到 “JDBC:H2:MEM:TESTDB” 反正:
@Component
public class AfterInit implements CommandLineRunner {
@Autowired
DataSource dataSource;
@Override
public void run(String... args) throws Exception {
out.println(dataSource);
}
}
为什么spring boot无法找到正确的数据库配置?