zoukankan      html  css  js  c++  java
  • maven 打jar 找不到 jsp 页面

    主要是修改pom文件,配置bulid的选项

    一个是把资源包含进来

    一个是降低maven plugins的版本

    指定maven plugins的mainClass

    附录pom的build部分

    <build>
            <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/webapp</directory>
                 <!--注意此次必须要放在此目录下才能被访问到 -->
                 <targetPath>META-INF/resources</targetPath>
                 <includes>
                    <include>**/**</include>
                 </includes>
            </resource>
        </resources>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>1.4.2.RELEASE</version>                        //降低版本
                    
                    <configuration>
                    <mainClass>cn.taotao.Zhouyi3Application</mainClass>           //指定mainclass,需要手动添加
                        <excludes>
                            <exclude>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                            </exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <useDefaultDelimiters>true</useDefaultDelimiters>
                    </configuration>
                </plugin>
            </plugins>
    
    
        </build>
  • 相关阅读:
    POJ 2503 Babelfish
    POJ 2528 Mayor's posters
    203C Photographer
    190A Vasya and the Bus
    POJ 3630 Trie树 TLE
    ThinkPHP验证码的使用
    mysql_fetch_row、mysql_fetch_array、mysql_fetch_assoc、mysql_fetch_object
    ThinkPHP模版布局方式
    Windows 下使用Git管理Github项目
    浅析mysql、mysqli、PDO
  • 原文地址:https://www.cnblogs.com/sdgtxuyong/p/14413408.html
Copyright © 2011-2022 走看看