Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
原因:
springboot启动时会自动注入数据源和配置jpa
解决:
在@SpringBootApplication中排除其注入 exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class}
//@SpringBootApplication
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
public class CreditApplication {
public static void main(String[] args) {
SpringApplication.run(CreditApplication.class, args);
}
}