jeesite多环境配置

news2024/11/24 23:01:13

jeesite多环境配置

参考网址:

https://blog.csdn.net/shaoming314/article/details/129115912?spm=1001.2014.3001.5501

开源项目地址:

https://gitee.com/thinkgem/jeesite

Spring + Spring MVC + mybatis + Ehcache + shiro + mysql + jsp (主要技术栈)

项目地址:

https://gitee.com/shao_ming314/jeesite

对应分支

shaoming-spring4-dev

https://gitee.com/shao_ming314/jeesite/tree/shaoming-spring4-dev/

多环境配置目录

image-20230227090749770

每个环境下对应配置文件

  • jeesite.properties
  • logback.xml

image-20230227091103407

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.thinkgem.jeesite</groupId>
	<artifactId>jeesite</artifactId>
	<version>1.2.8</version>
	<packaging>war</packaging>
	
	<name>JeeSite</name>
	<url>http://thinkgem.github.com/jeesite</url>
	<inceptionYear>2012-2016</inceptionYear>
	
	<!-- 项目属性 -->
	<properties>
		
		<!-- main version setting -->
		<spring.version>4.1.9.RELEASE</spring.version>
		<validator.version>5.2.4.Final</validator.version>
		<mybatis.version>3.2.8</mybatis.version>
		<mybatis-spring.version>1.2.3</mybatis-spring.version>
		<druid.version>1.0.18</druid.version>
		<ehcache.version>2.6.11</ehcache.version>
		<ehcache-web.version>2.0.4</ehcache-web.version>
		<shiro.version>1.2.6</shiro.version>
		<sitemesh.version>2.4.2</sitemesh.version>
		<activiti.version>5.21.0</activiti.version>
		
		<!-- tools version setting -->
		<slf4j.version>1.7.7</slf4j.version>
		<logback.version>1.2.6</logback.version>
		<commons-lang3.version>3.3.2</commons-lang3.version>
		<commons-io.version>2.4</commons-io.version>
		<commons-codec.version>1.9</commons-codec.version>
		<commons-fileupload.version>1.3.1</commons-fileupload.version>
		<commons-beanutils.version>1.9.1</commons-beanutils.version>
		<jackson.version>2.2.3</jackson.version>
		<fastjson.version>1.1.40</fastjson.version>
		<xstream.version>1.4.7</xstream.version>
		<guava.version>17.0</guava.version>
		<dozer.version>5.5.1</dozer.version>
		<poi.version>3.9</poi.version>
		<freemarker.version>2.3.20</freemarker.version>
		
		<!-- jdbc driver setting -->
		<mysql.driver.version>5.1.30</mysql.driver.version>
		<oracle.driver.version>10.2.0.4.0</oracle.driver.version>
		<mssql.driver.version>1.3.1</mssql.driver.version>
	    
		<!-- environment setting -->
		<jdk.version>1.6</jdk.version>
		<tomcat.version>2.2</tomcat.version>
		<jetty.version>7.6.14.v20131031</jetty.version>
		<webserver.port>8181</webserver.port>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<downloadSources>true</downloadSources>
		
	</properties>
	
	<!-- 设定主仓库,按设定顺序进行查找。 -->
	<repositories>
	
		<repository>
			<id>jeesite-repos</id>
			<name>Jeesite Repository</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
		</repository>
		
	</repositories>
	
	<!-- 设定插件仓库 -->
	<pluginRepositories> 
	
		<pluginRepository>
			<id>jeesite-repos</id>
			<name>Jeesite Repository</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
		</pluginRepository>
		
	</pluginRepositories> 
	
	<!-- 依赖项定义 -->
	<dependencies>
	
		<!-- SPRING begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${spring.version}</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-tx</artifactId>
			<version>${spring.version}</version>
		</dependency>
			
		<!-- spring orm -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		
		<!-- bean validate -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>${validator.version}</version>
		</dependency>
		<!-- SPRING end -->
		
		<!-- AOP begin -->
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjrt</artifactId>
			<version>1.7.4</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.7.4</version>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>3.1</version>
		</dependency>
		<!-- AOP end -->
		
		<!-- PERSISTENCE begin -->
		
		<!-- MyBatis -->
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
			<version>${mybatis.version}</version>
		</dependency>
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis-spring</artifactId>
			<version>${mybatis-spring.version}</version>
		</dependency>
		
		<!-- connection pool -->
		<dependency>
		     <groupId>com.alibaba</groupId>
		     <artifactId>druid</artifactId>
		     <version>${druid.version}</version>
		</dependency>
		
		<!-- jdbc driver -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>${mysql.driver.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>com.oracle</groupId>
			<artifactId>ojdbc14</artifactId>
			<version>${oracle.driver.version}</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ojdbc14-10.2.0.4.0.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>net.sourceforge.jtds</groupId>
			<artifactId>jtds</artifactId>
			<version>${mssql.driver.version}</version>
			<scope>runtime</scope>
		</dependency>
		<!-- PERSISTENCE end -->
		
		<!-- WEB begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-oxm</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>opensymphony</groupId>
			<artifactId>sitemesh</artifactId>
			<version>${sitemesh.version}</version>
		</dependency>
		<dependency>
			<groupId>taglibs</groupId>
			<artifactId>standard</artifactId>
			<version>1.1.2</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>
		<!-- <dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.2</version>
			<scope>provided</scope>
		</dependency> -->
		<!-- WEB end -->

		<!-- CACHE begin -->
		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache-core</artifactId>
			<version>${ehcache.version}</version>
		</dependency>
		<dependency>
			<groupId>net.sf.ehcache</groupId>  
			<artifactId>ehcache-web</artifactId>  
			<version>${ehcache-web.version}</version>
		</dependency>
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
			 <version>2.5.1</version>
		</dependency>
		<!-- CACHE end -->
		
		<!-- SECURITY begin -->
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-core</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-spring</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-cas</artifactId>
			<version>${shiro.version}</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-web</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-ehcache</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<!-- SECURITY end -->
		
		<!-- Activiti -->
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-engine</artifactId>
			<version>${activiti.version}</version>
		</dependency>
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-spring</artifactId>
			<version>${activiti.version}</version>
		</dependency>
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-explorer</artifactId>
			<version>${activiti.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>vaadin</artifactId>
					<groupId>com.vaadin</groupId>
				</exclusion>
				<exclusion>
					<artifactId>dcharts-widget</artifactId>
					<groupId>org.vaadin.addons</groupId>
				</exclusion>
				<exclusion>
					<artifactId>activiti-simple-workflow</artifactId>
					<groupId>org.activiti</groupId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-modeler</artifactId>
            <version>${activiti.version}</version>
		</dependency>
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-diagram-rest</artifactId>
			<version>${activiti.version}</version>
		</dependency>
		
		<!-- 支持activiti缓存 -->
		<!-- <dependency>
			<groupId>org.infinispan</groupId>
			<artifactId>infinispan-core</artifactId>
			<version>5.1.7.Final</version>
		</dependency> -->
		
		<!-- LOGGING begin -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- common-logging 实际调用 slf4j -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- jdk logging 实际调用 slf4j -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- log4j 实际调用 slf4j -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>log4j-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- slf4j logback 实现   -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
		</dependency>
		<!-- LOGGING end -->
		
		<!-- GENERAL UTILS begin -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${commons-lang3.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons-io.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>${commons-codec.version}</version>
		</dependency>
		<dependency>
		    <groupId>commons-fileupload</groupId>
		    <artifactId>commons-fileupload</artifactId>
		    <version>${commons-fileupload.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>${commons-beanutils.version}</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		
		<!-- google java lib -->
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>
		
		<!-- jackson json -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-annotations</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.module</groupId>
			<artifactId>jackson-module-jaxb-annotations</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		
		<!-- fastjson json
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>${fastjson.version}</version>
		</dependency> -->
		
		<!-- xstream xml -->
		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>${xstream.version}</version>
		</dependency>
		
		<!-- pojo copy -->
		<dependency>
			<groupId>net.sf.dozer</groupId>
			<artifactId>dozer</artifactId>
			<version>${dozer.version}</version>
		</dependency>
		
		<!-- freemarker engine -->
		<dependency>
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>${freemarker.version}</version>
		</dependency>
		
		<!-- email -->
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.4.7</version>
		</dependency>
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
			<version>1.1.1</version>
		</dependency>
		
		<!-- poi office -->
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
			<version>${poi.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>${poi.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml-schemas</artifactId>
			<version>${poi.version}</version>
		</dependency>
		
		<!-- image util -->
		<dependency>
			<groupId>com.drewnoakes</groupId>
			<artifactId>metadata-extractor</artifactId>
			<version>2.6.2</version>
		</dependency>
		
		<!-- 条形码、二维码生成  -->
		<dependency>
			<groupId>com.google.zxing</groupId>
			<artifactId>core</artifactId>
			<version>2.2</version>
		</dependency>
		<dependency>
			<groupId>com.google.zxing</groupId>
			<artifactId>javase</artifactId>
			<version>2.2</version>
		</dependency>
		
		<!-- 中文分词 -->
		<dependency>
			<groupId>org.wltea</groupId>
			<artifactId>analyzer</artifactId>
			<version>2012_u6</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/analyzer-2012_u6.jar</systemPath>
		</dependency>
		<!-- GENERAL UTILS end -->
		
		<!-- CKFinder begin -->
		<dependency>
			<groupId>net.coobird</groupId>
			<artifactId>thumbnailator</artifactId>
			<version>0.4.2</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/thumbnailator-0.4.2.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>com.ckfinder</groupId>
			<artifactId>apache-ant-zip</artifactId>
			<version>2.3</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/apache-ant-zip-2.3.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>com.ckfinder</groupId>
			<artifactId>ckfinder</artifactId>
			<version>2.3</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ckfinder-2.3.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>com.ckfinder</groupId>
			<artifactId>ckfinderplugin-fileeditor</artifactId>
			<version>2.3</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ckfinderplugin-fileeditor-2.3.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>com.ckfinder</groupId>
			<artifactId>ckfinderplugin-imageresize</artifactId>
			<version>2.3</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ckfinderplugin-imageresize-2.3.jar</systemPath>
		</dependency>
		<!-- CKFinder end -->
		
		<!-- TEST begin -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!-- TEST end -->
		
		<!-- User Agent -->
		<dependency>
			<groupId>bitwalker</groupId>
			<artifactId>UserAgentUtils</artifactId>
			<version>1.13</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/UserAgentUtils-1.13.jar</systemPath>
		</dependency>
		
		<!-- 自定义jar依赖包
		<dependency>
			<groupId>com.thinkgem.jeesite</groupId>
			<artifactId>test-core</artifactId>
			<version>1.0</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/test-core-1.0.jar</systemPath>
		</dependency> -->
		
		<!-- 使用 Jetty JSP引擎 
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-jsp</artifactId>
			<version>${jetty.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.eclipse.jetty.orbit</groupId>
					<artifactId>javax.servlet</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.eclipse.jetty.orbit</groupId>
					<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
				</exclusion>
			</exclusions>
		</dependency> -->
		
	</dependencies>

	<build>
		<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>
		<plugins>
			<!-- Compiler 插件, 设定JDK版本 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>${jdk.version}</source>
					<target>${jdk.version}</target>
					<showWarnings>true</showWarnings>
				</configuration>
			</plugin>
			
			<!-- JSP 预编译插件  jspweb.xml
			<plugin>
				<groupId>org.jasig.mojo.jspc</groupId>
				<artifactId>jspc-maven-plugin</artifactId>
				<version>2.0.0</version>
				<configuration>
					<injectString>&lt;!- - [INSERT FRAGMENT HERE] - -&gt;</injectString>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.jasig.mojo.jspc</groupId>
						<artifactId>jspc-compiler-tomcat6</artifactId>
						<version>2.0.0</version>
					</dependency>
				</dependencies>
			</plugin>-->
			
			<!-- Jetty JSP 预编译插件  web.xml
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-jspc-maven-plugin</artifactId>
				<version>${jetty.version}</version>
				<configuration>
					<insertionMarker>&lt;!- - [INSERT FRAGMENT HERE] - -&gt;</insertionMarker>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>jspc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>-->
			
			<!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
				<!-- <executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<classesDirectory>${project.outputDirectory}</classesDirectory>
							<finalName>jeesite</finalName>
							<outputDirectory>${project.build.directory}/${project.artifactId}/WEB-INF/lib</outputDirectory>
							<includes>
					        	<include>com/thinkgem/jeesite/**</include>
					       	</includes>
						</configuration>
					</execution>
				</executions> -->
			</plugin>
			
			<!-- 混淆代码
			<plugin>
				<groupId>com.github.wvengen</groupId>
				<artifactId>proguard-maven-plugin</artifactId>
				<version>2.0.11</version>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>proguard</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
			        <obfuscate>true</obfuscate>
			    	<options>
                        <option>-injars ${project.build.directory}/${project.artifactId}/WEB-INF/lib/jeesite.jar</option>
                    </options>
                    <outjar>${project.artifactId}/WEB-INF/lib/jeesite_out.jar</outjar>
                    <outputDirectory>${project.build.directory}</outputDirectory>
			        <proguardInclude>${basedir}/proguard.cfg</proguardInclude>
					<source>${jdk.version}</source>
					<target>${jdk.version}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
					<libs>
						<lib>${java.home}/lib/rt.jar</lib>
						<lib>${java.home}/lib/jsse.jar</lib>
			            <lib>${java.home}/lib/jce.jar</lib>
					</libs>
			        <addMavenDescriptor>false</addMavenDescriptor>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>net.sf.proguard</groupId>
						<artifactId>proguard-base</artifactId>
						<version>4.9</version>
						<scope>runtime</scope>
					</dependency>
				</dependencies>
			</plugin> -->

			<!-- war 打包插件, 设定war包名称不带版本号 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<packagingExcludes>
						<!-- WEB-INF/classes/com/thinkgem/jeesite/** -->
						WEB-INF/classes/org/apache/ibatis/**,
						WEB-INF/classes/org/mybatis/spring/**
					</packagingExcludes>
					<warSourceExcludes>
						static/bootstrap/2.3.1/docs/**,
						static/ckeditor/_samples/**,
						static/ckeditor/_source/**,
						static/ckfinder/_samples/**,
						static/ckfinder/help/**,
						static/compressor*/**,
						static/jquery-jbox/2.3/docs/**,
						static/jquery-jbox/2.3/Skins2/**,
						static/jquery-validation/1.11.0/demo/**,
						static/jquery-ztree/3.5.12/demo/**,
						static/My97DatePicker/docs/**,
						static/supcan/doc/**,
						static/SuperSlide/demo/**,
						static/treeTable/demo/**<!-- , -->
						<!-- userfiles/** --><!-- ,/**/*.jsp -->,
						test/**
					</warSourceExcludes>
					<webappDirectory>${project.build.directory}/${project.artifactId}</webappDirectory><!-- 
					<webXml>${project.basedir}/target/jspweb.xml</webXml> -->
					<warName>${project.artifactId}</warName>
				</configuration>
			</plugin>
			
			<!-- Eclipse 插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<downloadSources>${downloadSources}</downloadSources>
					<downloadJavadocs>false</downloadJavadocs>
					<wtpversion>2.0</wtpversion>
					<jeeversion>5.0</jeeversion>
					<!-- <jeeversion>6.0</jeeversion> -->
					<additionalConfig>
						<file>
							<name>.settings/org.eclipse.core.resources.prefs</name>
							<content>
								<![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=${project.build.sourceEncoding}${line.separator}]]>
							</content>
						</file>
					</additionalConfig>
					<additionalProjectnatures>
						<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
					</additionalProjectnatures>
				</configuration>
			</plugin>
			
			<!-- tomcat6插件 -->
			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat6-maven-plugin</artifactId>
				<version>${tomcat.version}</version> 
				<configuration>
					<port>${webserver.port}</port>
					<path>/${project.artifactId}</path>
					<uriEncoding>${project.build.sourceEncoding}</uriEncoding>
				</configuration>
			</plugin>
			
			<!-- tomcat7插件 -->
			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>${tomcat.version}</version> 
				<configuration>
					<port>${webserver.port}</port>
					<path>/${project.artifactId}</path>
					<uriEncoding>${project.build.sourceEncoding}</uriEncoding>
				</configuration>
			</plugin>
			
			<!-- jetty插件 -->
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<version>${jetty.version}</version>
				<configuration>
					<connectors>
						<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
							<port>${webserver.port}</port>
						</connector>
					</connectors>
					<webAppConfig>
						<contextPath>/${project.artifactId}</contextPath>
					</webAppConfig>
					<systemProperties>  
						<systemProperty>
							<name>org.mortbay.util.URI.charset</name>
							<value>${project.build.sourceEncoding}</value>
						</systemProperty>
					</systemProperties>
				</configuration>
			</plugin>
			
			<!-- resource插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.7</version>
			</plugin>
			
			<!-- install插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>2.5.2</version>
			</plugin>
			
			<!-- clean插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>2.6.1</version>
			</plugin>
			
			<!-- ant插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
			</plugin>
			
			<!-- dependency插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.10</version>
			</plugin>
		</plugins>

		<!-- 多环境配置 -->
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<!-- 这个filter必须要设为true, 把所有文件都过滤掉,然后下面再手动include,一个一个文件夹自己添加 -->
				<filtering>false</filtering>
				<excludes>
					<exclude>jeesite.properties</exclude>
					<exclude>logback.xml</exclude>
				</excludes>
			</resource>
			<resource>
				<!-- 这里会直接把${profiles.active}对应文件夹下的内容打包到classpath下 -->
				<directory>src/main/resources/profiles/${profiles.active}</directory>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<!-- 这个filter必须要设为true, 把所有文件都过滤掉,然后下面再手动include,一个一个文件夹自己添加 -->
				<filtering>false</filtering>
			</testResource>
			<testResource>
				<!-- 这里会直接把${profiles.active}对应文件夹下的内容打包到classpath下 -->
				<directory>src/test/resources</directory>
			</testResource>
		</testResources>
	</build>
	
	<profiles>
		<!-- 多环境配置 -->
		<profile>
			<!-- 开发环境 -->
			<id>dev</id>
			<properties>
				<profiles.active>dev</profiles.active>
			</properties>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
		<profile>
			<!-- 测试环境 -->
			<id>test</id>
			<properties>
				<profiles.active>test</profiles.active>
			</properties>
		</profile>
		<profile>
			<!-- 生产环境 -->
			<id>prd</id>
			<properties>
				<profiles.active>prd</profiles.active>
			</properties>
		</profile>

		<!-- 初始化数据库 -->			
		<profile>
			<id>init-db</id>
			<dependencies>
				<dependency>
					<groupId>org.dbunit</groupId>
					<artifactId>dbunit</artifactId>
					<version>2.4.8</version>
				</dependency>
			  	<dependency>
				    <groupId>org.apache.poi</groupId>
				    <artifactId>poi</artifactId>
				    <version>3.2-FINAL</version>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.7</version>
						<configuration>
							<target>
								
								<!-- mysql -->
								<property name="dbunit.datatype" value="org.dbunit.ext.mysql.MySqlDataTypeFactory" />
								
								<!-- mssql
								<property name="dbunit.datatype" value="org.dbunit.ext.mssql.MsSqlDataTypeFactory" /> -->
								
								<!-- oracle
								<property name="dbunit.datatype" value="org.dbunit.ext.oracle.Oracle10DataTypeFactory" /> -->
								
								<property file="src/main/resources/jeesite.properties" />
								<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}" password="${jdbc.password}" 
									onerror="continue" encoding="${project.build.sourceEncoding}">
									<classpath refid="maven.test.classpath" />
									<transaction src="db/sys/jeesite_${jdbc.type}.sql"/>
									<transaction src="db/cms/jeesite_${jdbc.type}.sql"/>
									<transaction src="db/oa/jeesite_${jdbc.type}.sql"/>
									<transaction src="db/gen/jeesite_${jdbc.type}.sql"/>
									<transaction src="db/gen/example_${jdbc.type}.sql"/>
									<transaction src="db/test/jeesite_${jdbc.type}.sql"/>
									<transaction src="db/act/drop/activiti.${jdbc.type}.drop.engine.sql"/>
									<transaction src="db/act/drop/activiti.${jdbc.type}.drop.history.sql"/>
									<transaction src="db/act/drop/activiti.${jdbc.type}.drop.identity.sql"/>
									<transaction src="db/act/create/activiti.${jdbc.type}.create.engine.sql"/>
									<transaction src="db/act/create/activiti.${jdbc.type}.create.history.sql"/>
									<transaction src="db/act/create/activiti.${jdbc.type}.create.identity.sql"/>
								</sql>
								
								<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" classpathref="maven.test.classpath" />
								
								<!-- mysql、mssql -->
								<dbunit driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
									 password="${jdbc.password}">
								
								<!-- oracle
								<dbunit driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
									password="${jdbc.password}" schema="${jdbc.username}" > -->
									
									<dbconfig>
										<property name="datatypeFactory" value="${dbunit.datatype}" />
									</dbconfig>
									<classpath refid="maven.test.classpath" />
									<operation type="INSERT" src="db/sys/jeesite_data.xls" format="xls" transaction="true"/>
									<operation type="INSERT" src="db/cms/jeesite_data.xls" format="xls" transaction="true"/>
									
								</dbunit>
								
							</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	
	<!-- 开发者信息 -->
	<developers>  
		<developer>
			<id>thinkgem</id>
			<name>WangZhen</name>
			<email>thinkgem at 163.com</email>
			<roles><role>Project lead</role></roles>
			<timezone>+8</timezone>
		</developer>
	</developers>
	
</project>

修改部分

image-20230227090924718

image-20230227090935217

说明

默认环境为 dev 环境

image-20230227090959584

打包

命令

mvn clean package -Dmaven.skip.test=true -Pprd

项目打包 跳过测试 指定为 prd(生产环境) , 不指定环境默认为 dev(开发环境)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/385493.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【大数据离线开发】8.3 Hive的数据模型

8.4 Hive的数据模型 Hive的数据存储 基于HDFS没有专门的数据存储格式存储结构主要包括&#xff1a;数据库、文件、表、视图可以直接加载文本文件&#xff08;.txt文件&#xff09;创建表时&#xff0c;指定Hive数据的列分隔符与行分隔符 8.4.1 内部表 hive 的内部表类似 My…

hexo静态网站部署到腾讯云cos

hexo支持很多部署方案&#xff0c;最直接的就是部署在GitHub Pages服务上&#xff0c;国内gitee、coding等代码托管平台也都支持静态网站服务&#xff0c;而且免费。 但是GitHub在国内访问不太稳定&#xff0c;国内的代码托管平台资源和服务也不太稳定&#xff0c;后来想了想&…

windows安装tomcat

这里写自定义目录标题tomcat官网下载安装包并解压环境变量配置启动tomcat访问http://localhost:8080/修复启动出现乱码问题tomcat官网下载安装包并解压 环境变量配置 系统环境变量新增&#xff1a; 变量名&#xff1a;CATALINA_HOME 变量值&#xff1a;tomcat的安装目录 编辑…

使用MAT进行内存分析,并找到OOM问题

前言 在处理一次现场问题时&#xff0c;发现服务还在运行&#xff0c;但是出现假死情况&#xff0c;后通过分析GC日志以及使用MAT分析确定问题是内存溢出OutOfMemery(OOM)&#xff1b;这里只记录MAT分析学习过程,最近工作忙&#xff0c;补记录。 GC日志分析 首先&#xff0c;如…

EM@三角函数诱导公式

文章目录诱导公式单位圆坐标和三角函数记忆口诀符号看象限奇变偶不变例常用诱导公式&#x1f388;常用部分(5对)倒数关系六种三角函数间的转换关系小结ReflectionsShifts and periodicity诱导公式 诱导公式 - 维基百科&#xff0c;自由的百科全书 (wikipedia.org) 单位圆坐标…

推送投票制作微信推送里投票制作教程在线投票活动制作

近些年来&#xff0c;第三方的微信投票制作平台如雨后春笋般络绎不绝。随着手机的互联网的发展及微信开放平台各项基于手机能力的开放&#xff0c;更多人选择微信投票小程序平台&#xff0c;因为它有非常大的优势。1.它比起微信公众号自带的投票系统、传统的H5投票系统有可以图…

一文看懂网上下单的手机流量卡为什么归属都是随机的!

最近很多网上下单的小伙伴们心中似乎都有一个疑问。那就是网上很多手机卡、流量卡都不能自选号码和归属地&#xff0c;就算能自选号码&#xff0c;归属地也是随机的而且很多都不会跟你说具体的城市&#xff0c;这是为什么呢&#xff1f;莫非其中有什么不可告人的秘密吗?小伙伴…

JetBrains IntelliJ支持自动切换输入法,写代码如丝般顺滑

背景简介对于母语为中文的开发者&#xff0c;写代码过程中经常需要在中/英输入法之间进行切换&#xff0c;而且由于不清楚当前处于哪种输入状态&#xff0c;有时输入到一半发现输入法错了&#xff0c;删除重新输入&#xff0c;有时切换了好几次都没有成功&#xff0c;实在太影响…

【强化学习】强化学习数学基础:蒙特卡洛方法

强化学习数学方法&#xff1a;蒙特卡洛方法举个例子举个例子1&#xff1a;投掷硬币The simplest MC-based RL algorithm举个例子2&#xff1a;Episode lengthUse data more efficientlyMC without exploring starts总结内容来源将value iteration和policy iteration方法称为mod…

无线耳机哪个品牌好一点?2023四款好用的无线耳机排行

随着蓝牙耳机的普及&#xff0c;越来越多的耳机厂商加入蓝牙耳机这条竞争赛道。不同品牌的蓝牙耳机又有着不同的价位区间&#xff0c;不同的性能配置&#xff0c;不同的外观设计&#xff0c;可以说现在的蓝牙耳机多到让人在选择时眼花缭乱。那么&#xff0c;无线耳机哪个品牌好…

云端需求助力跑赢周期,金山办公有望借助ChatGPT加速腾飞

与微软在办公领域“搏杀”了三十年的金山办公&#xff0c;或许正在迎来自己的“第二春”。2月25日&#xff0c;金山办公&#xff08;688111&#xff09;发布2022年度业绩快报&#xff0c;全年营收38.85亿元人民币&#xff08;单位下同&#xff09;&#xff0c;同比增加18.44%&a…

智慧工厂数字孪生可视化监测系统有效提升厂区安全管控效力

我国制造业正处于产业升级的关键时期&#xff0c;基于数据进行生产策略制定与管理是大势所趋&#xff0c;而数据可视化以更直观的方式成为数据分析传递信息的重要工具。 深圳华锐视点通过三维可视化手段对工厂各类设备进行三维建模&#xff0c;真实复现设备设施外观、结构、运转…

基于卷积神经网络CNN的分类研究,基于卷积神经网络的手写体识别

目录 背影 卷积神经网络CNN的原理 卷积神经网络CNN的定义 卷积神经网络CNN的神经元 卷积神经网络CNN的激活函数 卷积神经网络CNN的传递函数 卷积神经网络CNN手写体识别 基本结构 主要参数 MATALB代码 结果图 展望 背影 现在生活&#xff0c;各种人工智能都要求对图像拥有识别…

Linux内核4.14版本——drm框架分析(1)——drm简介

目录 1. DRM简介&#xff08;Direct Rendering Manager&#xff09; 1.1 DRM发展历史 1.2 DRM架构对比FB架构优势 1.3 DRM图形显示框架 1.4 DRM图形显示框架涉及元素 1.4.1 DRM Framebuffer 1.4.2 CRTC 1.4.3 Encoder 1.4.4 Connector 1.4.5 Bridge 1.4.6 Panel 1.4.…

双指针法将时间复杂度从 O(n^2) 优化到 O(n)

[1] 什么是双指针法 双指针法&#xff08;Two Pointers&#xff09;是一种常见的算法技巧&#xff0c;常用于数组和链表等数据结构中。 双指针法的基本思想是维护两个指针&#xff0c;分别指向不同的位置&#xff0c;通过它们的移动来解决问题。在某些情况下&#xff0c;使用双…

【Leetcode】移除链表元素 链表的中间节点 链表中倒数第k个节点

目录 一.【Leetcode203】移除链表元素 1.链接 2.题目再现 A.双指针法 B.类尾删法 C.哨兵位 二.【Leetcode876】链表的中间节点 1.链接&#xff1a;链表的中间节点 2.题目再现 3.解法&#xff1a;快慢指针 三.链表中倒数第k个节点 1.链接&#xff1a;链表中倒数第k个…

LiveGBS国标GB/T28181国标视频流媒体平台-功能报警订阅配置报警预案告警截图及录像

LiveGBS国标GB/T28181国标视频流媒体平台-功能报警订阅配置报警预案告警截图及录像1、报警信息1.1、报警查询1.2、配置开启报警订阅1.2.1、国标设备编辑1.2.2、选择开启报警订阅1.3、配置摄像头报警1.3.1、配置摄像头报警通道ID1.3.2、配置摄像头开启侦测1.3.3、尝试触发摄像头…

企业为什么需要做APP安全评估?

近几年新型信息基础设施建设和移动互联网技术的不断发展&#xff0c;移动APP数量也呈现爆发式增长&#xff0c;进而APP自身的“脆弱性”也日益彰显&#xff0c;这对移动用户的个人信息及财产安全带来巨大威胁和挑战。在此背景下&#xff0c;国家出台了多部法律法规&#xff0c;…

【架构师】跟我一起学架构——微服务分层监控

博客昵称&#xff1a;架构师Cool 最喜欢的座右铭&#xff1a;一以贯之的努力&#xff0c;不得懈怠的人生。 作者简介&#xff1a;一名Coder&#xff0c;软件设计师/鸿蒙高级工程师认证&#xff0c;在备战高级架构师/系统分析师&#xff0c;欢迎关注小弟&#xff01; 博主小留言…

机器学习与目标检测作业:安装pytorch

机器学习与目标检测作业&#xff1a;安装pytorch一、 进入官网复制下载命令二、 下载的过程2.1 conda命令运行三、 测试pytorch是否安装成功安装pytorch教程 一、 进入官网复制下载命令 进入官网复制下载命令如下图所示 二、 下载的过程 下载的过程如下图所示 2.1 conda命令运…