
日志檔案:
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
uj5u.com熱心網友回復:
沒有找到com.alibaba.druid.jaruj5u.com熱心網友回復:
兄弟,解決沒uj5u.com熱心網友回復:
哥們,解決了沒uj5u.com熱心網友回復:
哥們,請教一下這個問題是怎么解決的,謝謝了uj5u.com熱心網友回復:
哥們,求分享解決方法,謝過了!!![email protected]uj5u.com熱心網友回復:
我也這個問題,但是我是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>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/104027.html
標籤:其他
