首页 新闻 会员 周边 捐助

spring boot,项目

0
悬赏园豆:20 [已关闭问题] 关闭于 2023-12-17 16:58

server:
port: 8181
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/dormitory
username: root
password: 123456
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: com/southwind/mapper/xml/*.xml

server:
port: 8181
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/dormitory
username: root
password: 123456
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: com/southwind/mapper/xml/*.xml

以上是配置文件

"C:\Program Files (x86)\Java\jdk1.8.0_131\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\IDEA\IntelliJ IDEA 2022.2\lib\idea_rt.jar=57187:D:\IDEA\IntelliJ IDEA 2022.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-32.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Users\HP\Desktop\spring\宿舍管理\宿舍管理系统SpringBoot+Vue\dormitoryms_springboot\target\classes;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot-starter-web\2.7.0\spring-boot-starter-web-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot-starter\2.7.0\spring-boot-starter-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot\2.7.0\spring-boot-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot-starter-logging\2.7.0\spring-boot-starter-logging-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;D:\Maven\apache-maven-3.6.0\repository\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;D:\Maven\apache-maven-3.6.0\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;D:\Maven\apache-maven-3.6.0\repository\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;D:\Maven\apache-maven-3.6.0\repository\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;D:\Maven\apache-maven-3.6.0\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\Maven\apache-maven-3.6.0\repository\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot-starter-json\2.7.0\spring-boot-starter-json-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\com\fasterxml\jackson\core\jackson-databind\2.13.3\jackson-databind-2.13.3.jar;D:\Maven\apache-maven-3.6.0\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.3\jackson-annotations-2.13.3.jar;D:\Maven\apache-maven-3.6.0\repository\com\fasterxml\jackson\core\jackson-core\2.13.3\jackson-core-2.13.3.jar;D:\Maven\apache-maven-3.6.0\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.3\jackson-datatype-jdk8-2.13.3.jar;D:\Maven\apache-maven-3.6.0\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.3\jackson-datatype-jsr310-2.13.3.jar;D:\Maven\apache-maven-3.6.0\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.3\jackson-module-parameter-names-2.13.3.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot-starter-tomcat\2.7.0\spring-boot-starter-tomcat-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.63\tomcat-embed-core-9.0.63.jar;D:\Maven\apache-maven-3.6.0\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.63\tomcat-embed-el-9.0.63.jar;D:\Maven\apache-maven-3.6.0\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.63\tomcat-embed-websocket-9.0.63.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-web\5.3.20\spring-web-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-beans\5.3.20\spring-beans-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-webmvc\5.3.20\spring-webmvc-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-aop\5.3.20\spring-aop-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-context\5.3.20\spring-context-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-expression\5.3.20\spring-expression-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\mysql\mysql-connector-java\8.0.29\mysql-connector-java-8.0.29.jar;D:\Maven\apache-maven-3.6.0\repository\org\projectlombok\lombok\1.18.24\lombok-1.18.24.jar;D:\Maven\apache-maven-3.6.0\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-core\5.3.20\spring-core-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-jcl\5.3.20\spring-jcl-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\com\baomidou\mybatis-plus-boot-starter\3.3.2\mybatis-plus-boot-starter-3.3.2.jar;D:\Maven\apache-maven-3.6.0\repository\com\baomidou\mybatis-plus\3.3.2\mybatis-plus-3.3.2.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot-autoconfigure\2.7.0\spring-boot-autoconfigure-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\boot\spring-boot-starter-jdbc\2.7.0\spring-boot-starter-jdbc-2.7.0.jar;D:\Maven\apache-maven-3.6.0\repository\com\zaxxer\HikariCP\4.0.3\HikariCP-4.0.3.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-jdbc\5.3.20\spring-jdbc-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\org\springframework\spring-tx\5.3.20\spring-tx-5.3.20.jar;D:\Maven\apache-maven-3.6.0\repository\com\baomidou\mybatis-plus-generator\3.3.2\mybatis-plus-generator-3.3.2.jar;D:\Maven\apache-maven-3.6.0\repository\com\baomidou\mybatis-plus-extension\3.3.2\mybatis-plus-extension-3.3.2.jar;D:\Maven\apache-maven-3.6.0\repository\com\baomidou\mybatis-plus-core\3.3.2\mybatis-plus-core-3.3.2.jar;D:\Maven\apache-maven-3.6.0\repository\com\baomidou\mybatis-plus-annotation\3.3.2\mybatis-plus-annotation-3.3.2.jar;D:\Maven\apache-maven-3.6.0\repository\com\github\jsqlparser\jsqlparser\3.1\jsqlparser-3.1.jar;D:\Maven\apache-maven-3.6.0\repository\org\mybatis\mybatis\3.5.4\mybatis-3.5.4.jar;D:\Maven\apache-maven-3.6.0\repository\org\mybatis\mybatis-spring\2.0.4\mybatis-spring-2.0.4.jar;D:\Maven\apache-maven-3.6.0\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;D:\Maven\apache-maven-3.6.0\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;D:\Maven\apache-maven-3.6.0\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar" com.southwind.DormitorymsSpringbootApplication

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.7.0)

2023-12-17 16:53:09.500 INFO 3272 --- [ main] c.s.DormitorymsSpringbootApplication : Starting DormitorymsSpringbootApplication using Java 1.8.0_131 on DESKTOP-I14R703 with PID 3272 (C:\Users\HP\Desktop\spring\宿舍管理\宿舍管理系统SpringBoot+Vue\dormitoryms_springboot\target\classes started by HP in C:\Users\HP\Desktop\spring\宿舍管理\宿舍管理系统SpringBoot+Vue)
2023-12-17 16:53:09.503 INFO 3272 --- [ main] c.s.DormitorymsSpringbootApplication : No active profile set, falling back to 1 default profile: "default"
2023-12-17 16:53:10.580 INFO 3272 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2023-12-17 16:53:10.581 INFO 3272 --- [ main] o.a.catalina.core.AprLifecycleListener : Loaded Apache Tomcat Native library [1.2.39] using APR version [1.7.4].
2023-12-17 16:53:10.582 INFO 3272 --- [ main] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
2023-12-17 16:53:10.582 INFO 3272 --- [ main] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2023-12-17 16:53:10.587 INFO 3272 --- [ main] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 3.0.11 19 Sep 2023]
2023-12-17 16:53:10.598 INFO 3272 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-12-17 16:53:10.599 INFO 3272 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.63]
2023-12-17 16:53:10.710 INFO 3272 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-12-17 16:53:10.710 INFO 3272 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1157 ms
2023-12-17 16:53:10.815 WARN 3272 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'absentController': Unsatisfied dependency expressed through field 'absentService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'absentServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'absentMapper' defined in file [C:\Users\HP\Desktop\spring\宿舍管理\宿舍管理系统SpringBoot+Vue\dormitoryms_springboot\target\classes\com\southwind\mapper\AbsentMapper.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 [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.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 [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 org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
2023-12-17 16:53:10.818 INFO 3272 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2023-12-17 16:53:10.831 INFO 3272 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-12-17 16:53:10.856 ERROR 3272 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

Action:

Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

进程已结束,退出代码1

明明已经配置了数据库,仍然出现问题,求解决

溯流的主页 溯流 | 菜鸟二级 | 园豆:207
提问于:2023-12-17 16:57
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册