spring boot 没报错 就是运行不起来 日志文件的东西看不太懂

qq_17848145 2017-01-10 04:47:17




日志文件:
2017-01-10 16:20:44.328 [main] INFO com.iking.das.Run - Starting Run on yangfl with PID 4276 (D:\workplace\dasapi\target\classes started by Administrator in D:\workplace\dasapi)
2017-01-10 16:20:44.330 [main] INFO com.iking.das.Run - The following profiles are active: dev
2017-01-10 16:20:44.337 [background-preinit] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 5.2.4.Final
2017-01-10 16:20:44.367 [main] INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3c4bb879: startup date [Tue Jan 10 16:20:44 CST 2017]; root of context hierarchy
2017-01-10 16:20:45.408 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$80fdabc8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-01-10 16:20:45.701 [main] ERROR o.s.boot.bind.PropertiesConfigurationFactory - Properties configuration failed validation
2017-01-10 16:20:45.701 [main] ERROR o.s.boot.bind.PropertiesConfigurationFactory - Field error in object 'spring.datasource' on field 'type': rejected value [com.alibaba.druid.pool.DruidDataSource]; codes [typeMismatch.spring.datasource.type,typeMismatch.type,typeMismatch.java.lang.Class,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [spring.datasource.type,type]; arguments []; default message [type]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'type'; nested exception is java.lang.IllegalArgumentException: Cannot find class [com.alibaba.druid.pool.DruidDataSource]]
2017-01-10 16:20:45.702 [main] WARN o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'helloController': Unsatisfied dependency expressed through field 'tUserService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tUserService': Unsatisfied dependency expressed through field 'tUserMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'TUserMapper' defined in file [D:\workplace\dasapi\target\classes\com\iking\das\dao\TUserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Generic.class]: Unsatisfied dependency expressed through method 'dataSource' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties': Could not bind properties to DataSourceProperties (prefix=spring.datasource, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
Field error in object 'spring.datasource' on field 'type': rejected value [com.alibaba.druid.pool.DruidDataSource]; codes [typeMismatch.spring.datasource.type,typeMismatch.type,typeMismatch.java.lang.Class,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [spring.datasource.type,type]; arguments []; default message [type]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'type'; nested exception is java.lang.IllegalArgumentException: Cannot find class [com.alibaba.druid.pool.DruidDataSource]]
2017-01-10 16:20:45.710 [main] INFO o.s.b.a.l.AutoConfigurationReportLoggingInitializer -

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-01-10 16:20:45.713 [main] ERROR o.s.b.diagnostics.LoggingFailureAnalysisReporter -

***************************
APPLICATION FAILED TO START
***************************

Description:

Binding to target org.springframework.boot.autoconfigure.jdbc.DataSourceProperties@350540b7 failed:

Property: spring.datasource.type
Value: com.alibaba.druid.pool.DruidDataSource
Reason: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'type'; nested exception is java.lang.IllegalArgumentException: Cannot find class [com.alibaba.druid.pool.DruidDataSource]


Action:

Update your application's configuration

...全文
7045 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xjb1053695251 2020-01-16
  • 打赏
  • 举报
回复
我也这个问题,但是我是maven缺少POM文件,加上如下配置文件就行了 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatisplus-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus</artifactId> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> </dependency>
kangpp 2017-11-27
  • 打赏
  • 举报
回复
哥们,求分享解决方法,谢过了!!!353327533@qq.com
kangpp 2017-11-27
  • 打赏
  • 举报
回复
哥们,请教一下这个问题是怎么解决的,谢谢了
gaoyang763446561 2017-08-24
  • 打赏
  • 举报
回复
哥们,解决了没
奥尔良烤翅 2017-03-15
  • 打赏
  • 举报
回复
兄弟,解决没
街头小贩 2017-01-12
  • 打赏
  • 举报
回复
没有找到com.alibaba.druid.jar

10,607

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧