一、DOS命令启动Tomcat出错
- 问题描述(problem description)
The JRE_HOME environment variable is not defined correct
This environment variable is needed to run this program
- 解决方案
1、编辑文件D:\Java\apache-tomcat-7.0.67\bin\setclasspath.bat
2、添加添加两行代码Java根目录和jre根目录
set JAVA_HOME=D:\Java\jdk\jdk1.8.0_151
set JRE_HOME=D:\Java\jdk\jdk1.8.0_151\jre
二、Maven项目启动报ClassNotFoundException
- 问题描述
启动报错,信息如下
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.request.RequestContextListener
- 解决方案
选择项目---》Deployment Assembly---》Add---》Java Build Path Entries
---》Next--》Maven Dependencies---》Finish
三、No compiler is provided in this environment
- 问题描述
[ERROR] No compiler is provided in this environment.
Perhaps you are running on a JRE rather than a JDK?
- 解决方案
参考博客:https://blog.csdn.net/lslk9898/article/details/73836745
四、Spring Boot启动报错
- 问题描述
Caused by: java.lang.IllegalArgumentException:
No Spring Session store is configured: set the 'spring.session.store-type' property
- 解决方案
在application.properties文件中添加如下配置
#将session放入redis中
spring.session.store-type=redis
#不将session放入redis中
#spring.session.store-type=none