Intellij Idea 创建动态Web项目&配置Tomcat
没有写,呼呼
1.thymeleaf警告
[THYMELEAF][restartedMain] Template Mode 'HTML5' is deprecated. Using Template Mode 'HTML' instead.
2.idea 设置
下面两张图参数一致:
![image-20220627133807185](https://shxiaj.github.io/post-images/image-20220627133807185.png)
![image-20220627133837999](https://shxiaj.github.io/post-images/image-20220627133837999.png)
idea编译器设置字节码级别,重要!
![image-20220627133922599](https://shxiaj.github.io/post-images/image-20220627133922599.png)
jdk版本太高就会有各种bug
3.tomcat控制台中文乱码
"tomcat-9.0.64\conf\logging.properties"程序目录下,修改配置文件里的UTF-8调整为GBK
4.JDK1.8保平安
5.SpringMVC视图无法解析
idea报错,但实际是可以用的。添加依赖可以解决,实测没有解决,不管了
<!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity5 -->
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
<version>3.0.4.RELEASE</version>
</dependency>
6.Bug浏览器会自动发送当前页面的链接加上/null请求
[16:08:58.594 DEBUG] org.springframework.web.servlet.DispatcherServlet - Completed 200 OK
[16:08:58.824 DEBUG] org.springframework.web.servlet.DispatcherServlet - GET "/c1/null", parameters={}
[16:08:58.824 DEBUG] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped to com.atguigu.mvc.controller.HelloController#error404()
[16:08:58.825 DEBUG] org.springframework.web.servlet.DispatcherServlet - Completed 200 OK
禁用鼠标手势插件就行了,真是吐了