標籤:
將近太檔案進行zip打包,實現動靜分離
pom.xml
Xml代碼
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>${basedir}/static-zip.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
static-zip.xml
Xml代碼
- <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0">
- <id>project</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${basedir}/target/static/xxx</directory>
- <outputDirectory>project/pai</outputDirectory>
- </fileSet>
- </fileSets>
- </assembly>
》》源碼地址擷取
springmvc + mybatis整合詳細,及遇到的問題請參看以下資料:
參考資料:
http://www.springmvc,net/detail/6074493.html
http://my.spring.net/wangbiglei/blog/489583
http://my.springmvc.net/wangbiglei/blog/489604
maven之打包靜態檔案