常见问题2
1.
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-11-25 19:06:23.928 [restartedMain] INFO com.netflix.discovery.DiscoveryClient:888 - Shutting down DiscoveryClient ...
2021-11-25 19:06:23.938 [restartedMain] INFO com.netflix.discovery.DiscoveryClient:911 - Completed shut down of DiscoveryClient
2021-11-25 19:06:23.948 [restartedMain] ERROR org.springframework.boot.SpringApplication:821 - Application run failed
这个问题是因为你在pom文件里面加入了mybatis模块 却没有在config配置就里面增加mybatis的上下文导致启动报错的 starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled(这句话其实已经说得很明白了 在启动的时候 上下文错误 导致启动失败)
develop.properties 环境写错了
profile=devSSSS
profile=dev
2.
java.sql.SQLException: Access denied for user ‘edurw’@‘localhost’ (using password: YES)
连接数据库的用户名密码错误
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/edu_ad?characterEncoding=UTF-8&useUnicode=true&useSSL=false&serverTimezone=GMT
username: root
password: root
3
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project edu-pay-api: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile: java.lang.NoSuchMethodError: org.codehaus.plexus.compiler.CompilerError: method (Ljava/lang/String;ZIIIILjava/lang/String;)V not found
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.8.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
解决:我的是vm heap不足,把idea heap size加大点。