请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

正在回答 回答被采纳积分+3

2回答

提问者 岁月如_歌 2019-12-09 14:52:34

下载了老师的源码尝试启动报错。这个错误无法理解https://img1.sycdn.imooc.com//szimg/5dedee9f091cc14417900860.jpg

0 回复 有任何疑惑可以回复我~
廖师兄 2019-12-09 11:33:26

eureka的地址要配置在boostrap.yml里

0 回复 有任何疑惑可以回复我~
  • 提问者 岁月如_歌 #1
    ERROR 7592 --- [           main] o.s.boot.SpringApplication               : Application startup failed
    
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver     启动依然报错
    回复 有任何疑惑可以回复我~ 2019-12-09 14:56:52
  • 提问者 岁月如_歌 #2
    百度使用了@SpringBootApplication(exclude={DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})解决了这个报错但是又会报错
    ERROR 716 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
    
    ***************************
    APPLICATION FAILED TO START
    ***************************
    
    Description:
    
    Field orderDetailRepository in com.imooc.order.service.impl.OrderServiceImpl required a bean of type 'com.imooc.order.repository.OrderDetailRepository' that could not be found.
    回复 有任何疑惑可以回复我~ 2019-12-09 15:04:49
  • 廖师兄 回复 提问者 岁月如_歌 #3
    这个错误是没有获取到数据库的相关配置。
    回复 有任何疑惑可以回复我~ 2019-12-09 23:16:16
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信