SpringBoot | SpringBoot启动错误

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);
    }
}

 

posted @ 2018-11-10 11:26  听说这是最长的名字了  阅读(377)  评论(0编辑  收藏  举报