/*=========================2019.12.19更新==============================*/
Springboot不建议使用JSP,所以会忽略JSP文件。
我改用了Thymeleaf,刚开始接触,感觉和JSP相比更规范了。
看到网上说用这个,方便前端的人直接查看Thymeleaf模板(就是*.html)。
lol,继续搬砖学习~
/*=============================原博客================================*/
1.打包成jar的过程中,没有包含jsp文件。
可在pom.xml的<build>-<resources>下加入下面代码。
<resource> <directory>src/main/webapp</directory> <targetPath>META-INF/resources</targetPath> <includes> <include>**/**</include> </includes> </resource>
2.Springboot版本问题,原因暂时不清楚还请大佬们指点。
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <!--版本改为1.4.2--> <version>1.4.2.RELEASE</version> </plugin>