• IntelliJ IDEA 新建项目


    一 新建一个Java项目

    二 新建一个Web项目

     

    三 新建一个Maven项目

    四 web.xml常见版本

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             version="2.5">
    
    </web-app>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
             version="3.0">
    
    </web-app>
    

      

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
             version="3.1">
    
    </web-app>
    

      

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
             version="4.0">
    
    </web-app>
    

      

    五 pom.xml纯净版

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <groupId>com.hy.demo</groupId>
        <artifactId>demo-maven</artifactId>
        <version>1.0-SNAPSHOT</version>
        <!-- 指定打包方式 -->
        <packaging>war</packaging>
    
        <build>
            <plugins>
                <!-- 指定编译版本 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
    
                <!-- Tomcat7 -->
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.2</version>
                    <configuration>
                        <uriEncoding>UTF-8</uriEncoding>
                        <port>8080</port>
                        <path>/app</path>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </project>
    

      

  • 相关阅读:
    游记-HNOI2019
    题解-COCI2015Norma
    题解-Codeforces671D Roads in Yusland
    题解-POI2014 Supercomputer
    笔记-莫队的强制在线
    题解-HAOI2018全套
    题解-UOJ455 雪灾与外卖
    题解-Codeforces917D Stranger Trees
    题解-AtCoder Code-Festival2017 Final-J Tree MST
    Linux 配置svn
  • 原文地址:https://www.cnblogs.com/huangyi-427/p/9073870.html
Copyright © 2020-2023  润新知