webapp的内容被我扔到resources中 不然不会被打包到项目中
这样可能会读取不到webapp中的内容
在application.properties中添加
spring.resources.static-locations=classpath:/webapp/
然后pom文件中
如果不行的话 pom文件中再加入
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>