maven配置jdk版本
| <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.0</version> <configuration> <source>jdk-20</source> <target>jdk-20</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins>
|
资源导出问题,找不到资源,maven
java.lang.ExceptionInInitializerError,此标签放在build标签中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| <resources> <resource> <directory>src/main/resource</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> </resource> </resources>
|
web.xml 4.0空文件
1 2 3 4 5 6 7 8
| <?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"> <display-name>Archetype Created Web Application</display-name> </web-app>
|