/*=========================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>