赞
踩
重点在iml文件和pom文件很容易忽略里面的配置,自动生成iml文件启动会无法加载出项目
项目名称iml文件生成

- <?xml version="1.0" encoding="UTF-8"?>
- <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="web" name="Web">
- <configuration>
- <descriptors>
- <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
- </descriptors>
- <webroots>
- <root url="file://$MODULE_DIR$/web" relative="/" />
- </webroots>
- <sourceRoots>
- <root url="file://$MODULE_DIR$/src/main/java" />
- <root url="file://$MODULE_DIR$/src/main/resources" />
- </sourceRoots>
- </configuration>
- </facet>
- <facet type="Spring" name="Spring">
- <configuration />
- </facet>
- </component>
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
- <output url="file://$MODULE_DIR$/target/classes" />
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
- <excludeFolder url="file://$MODULE_DIR$/target" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2" level="project" />
- <orderEntry type="library" name="Maven: commons-io:commons-io:1.4" level="project" />
- <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
- <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.1.33" level="project" />
- <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.4" level="project" />
- <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.7" level="project" />
- <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.4" level="project" />
- <orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
- <orderEntry type="library" name="Maven: org.apache.commons:commons-imaging:1.0-alpha2" level="project" />
- <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.0.1" level="project" />
- <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
- </component>
- </module>


WebContent对应src\main\webapp

- <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.xxxxx</groupId>
- <artifactId>xxxxx</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>war</packaging>
-
- <properties>
- <java.version>1.8</java.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.2</version>
- </dependency>
-
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.4</version>
- </dependency>
-
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.4</version>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- <version>1.1.33</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.4</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</artifactId>
- <version>4.4.7</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- <version>4.5.4</version>
- </dependency>
-
- <!-- <dependency>-->
- <!-- <groupId>log4j</groupId>-->
- <!-- <artifactId>log4j</artifactId>-->
- <!-- <version>1.2.15</version>-->
- <!-- </dependency>-->
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-imaging</artifactId>
- <version>1.0-alpha2</version>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- </dependency>
-
- <!-- 单元测试支持 -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>3.2.2</version>
- <configuration>
- <warSourceDirectory>web</warSourceDirectory>
- <warName>image</warName>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- </project>

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。