zoukankan      html  css  js  c++  java
  • springboot如何直接读取webapp下页面?

    公司改用springboot的时候,将页面相关的文件都放在了src/main/webapp下,我直接通过main方式启动的时候,无法读取到src/mian/webapp下文件,但是通过spring-boot:run方法又可以读取到src/mian/webapp下文件,这是什么原因?

    要如何才能让main方式可以调用到src/mian/webapp下文件,因为我现在用spring-boot:run方法启动的时候无法debug

    <resources>
       <resource>
          <directory>src/main/webapp</directory>
          <!--注意此次必须要放在此目录下才能被访问到 -->
          <targetPath>META-INF/resources</targetPath>
          <includes>
             <include>**/**</include>
          </includes>
       </resource>
       <resource>
          <directory>src/main/resources</directory>
          <filtering>true</filtering>
          <includes>
             <include>**/*</include>
          </includes>
       </resource>
    </resources>
    

      

  • 相关阅读:
    Maven
    Maven
    Maven
    Maven
    Maven
    Maven
    Maven
    Maven
    Maven教程
    SASS
  • 原文地址:https://www.cnblogs.com/songanwei/p/9335629.html
Copyright © 2011-2022 走看看