xuexiangjys / XUpdateService

Use Spring Boot easy build, Gradle build, and provide update service for XUpdate.(使用Spring Boot简易搭建,Gradle构建,为XUpdate提供更新服务)
https://github.com/xuexiangjys/XUpdate/wiki
Apache License 2.0
217 stars 69 forks source link

请教一下,打成jar包后运行后:Cannot determine embedded database driver class for database type NONE #10

Closed silentzone closed 4 years ago

silentzone commented 4 years ago

java -jar xupdate.jar 报错:

WARN 24080 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountController': Unsatisfied dependency expressed through field 'accountService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'accountMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountMapper' defined in URL [jar:file:/E:/JavaProject/XUpdateService/target/xupdate.jar!/BOOT-INF/classes!/com/xuexiang/xupdateservice/mapper/AccountMapper.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 [tk/mybatis/mapper/autoconfigure/MapperAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

再开发模式没有问题,请问一下这个该怎么配置

silentzone commented 4 years ago

用maven 命令打的jar包