当前位置: 首页 > news >正文

jeesite多环境配置

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(开发环境)

相关文章:

jeesite多环境配置

jeesite多环境配置 参考网址&#xff1a; https://blog.csdn.net/shaoming314/article/details/129115912?spm1001.2014.3001.5501 开源项目地址&#xff1a; https://gitee.com/thinkgem/jeesite Spring Spring MVC mybatis Ehcache shiro mysql jsp (主要技术栈) 项目…...

项目中用到的知识点回顾---JWT(JSON Web Token)

1.JWT原理&#xff1a; JWT 的原理是&#xff0c;服务器认证以后&#xff0c;生成一个 JSON 对象&#xff0c;发回给用户&#xff0c;如下&#xff1b; {"姓名": "张三","角色": "管理员","到期时间": "2018年7月1日…...

string类常用函数

1&#xff08;substr函数&#xff09;&#xff1a;字符串截取函数&#xff0c;用于获取字符串的子串&#xff1a; //str.substr(begin&#xff0c;length)&#xff0c;用于截取str中以begin为下标长度为length的字串 string s“asd”; ss.substr(0,1);//结果为a。 2&#xff08…...

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

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

Python高性能编程

一、进程池和线程池 1.串行 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import time import requests url_lists [ http://www.baidu.com, http://fanyi.baidu.com, http://map.baidu.com, http://music.baidu.com/, http://tieba.baid…...

MVVM模式下如何正确【视图绑定+数据】

概述 我如何&#xff08;不在后面的代码中使用代码&#xff09;自动绑定到我想要的视图&#xff1f;据我了解&#xff0c;如果正确完成&#xff0c;这就是模式应该如何工作。我可以使用主窗口 xaml 中的代码实现这一切&#xff0c;我甚至正确创建了一个资源字典&#xff08;因…...

外包测试3年,离职后成功入职华为,拿到offer的那天我泪目了....

一提及外包测试&#xff0c;大部分人的第一印象就是&#xff1a;工作强度大&#xff0c;技术含量低&#xff0c;没有归属感&#xff01;外包工作三年总体感受就是这份工作缺乏归属感&#xff0c;心里总有一种落差&#xff0c;进步空间不大&#xff0c;接触不到核心技术&#xf…...

Qt Study

按钮->点击->窗口->关闭窗口 connect(信号的发送者&#xff0c;发送具体信号&#xff0c;信号的接收者&#xff0c;信号的处理); 信号处理函数称为槽 信号槽的优点&#xff0c;松散耦合&#xff0c;信号发送端和接收端本身是没有关联的&#xff0c;通过connect连接…...

JS混淆技术探究及解密方法分析

随着Web技术的快速发展&#xff0c;JavaScript被广泛应用于网页开发、移动应用开发等领域。然而&#xff0c;JavaScript代码很容易被反编译、解密&#xff0c;这给保护网站和应用程序的安全性带来了严重的挑战。为了解决这个问题&#xff0c;JS混淆技术应运而生。JS混淆就是将J…...

智慧制硅厂 Web SCADA 生产线

我国目前是全球最大的工业硅生产国、消费国和贸易国&#xff0c;且未来该产业的主要增量也将来源于我国。绿色低碳发展已成为全球大趋势和国际社会的共识&#xff0c;随着我国“双碳”目标的推进&#xff0c;光伏产业链快速发展&#xff0c;在光伏装机需求的带动下&#xff0c;…...

案例09-数据类型不一致导致equals判断为false

一&#xff1a;背景介绍 在判断课程id和班级id的时候如果一致就像课程信息进行更新&#xff0c;如果不一致就插入一条新的数据。其实两个变量的值是一致的但是类型是不一致的。这就导致数据库中已经有一条这样的数据了&#xff0c;在判断的时候结果为false&#xff0c;就有插入…...

springsecurity中的类

Authentication AuthenticationProvider 每一个AuthenticationProvider对应一个Authentication 很多个AuthenticationProvider 由一个 ProviderManager管理 ProviderManager implements AuthenticationManager 一个ProviderManager有很多个 AuthenticationProvider Usern…...

k8s配置管理

一、configmap 1.1 configmap概述 Configmap 是 k8s 中的资源对象&#xff0c;用于保存非机密性的配置的&#xff0c;数据可以用 key/value 键值对的形式保存&#xff0c;也可通过文件的形式保存。 1.2 configmap作用 我们在部署服务的时候&#xff0c;每个服务都有自己的配置…...

技术官方文档中的代码是用什么展示的?代码高亮插件总结

****内容预警****菜鸟教程***大佬绕道我们经常看到各种技术官方文档&#xff0c;有很多代码展示的区域&#xff0c;用于我们复制粘贴代码&#xff0c;比如vue 的官网当我们需要自己实现这么一个网站的时候&#xff0c;我就开始手忙脚乱&#xff0c;这到底是咋实现的&#xff1f…...

2023年中职组网络安全竞赛——综合渗透测试解析

综合渗透测试 题目如下: PS:需求环境可私信博主,求个三连吧! 解析如下: 通过本地PC中的渗透测试平台KALI2020对服务器场景进行渗透攻击,获取到RSYNC服务所开放的端口,将RSYNC服务开放的端口数值进行MD5加密后作为FLAG提交(如MD5加密前:812);...

【全网最细PAT题解】【PAT乙】1044 火星数字(测试点2,测试点4详细解释)

题目链接 1044 火星数字 题目描述 火星人是以 13 进制计数的&#xff1a;地球人的 0 被火星人称为 tret。 地球人数字 1 到 12 的火星文分别为&#xff1a;jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec。 火星人将进位以后的 12 个高位数字分别称为&#xff1a…...

rsync+xinetd+inotify+sersync

一、介绍 1.1、rsync 对比 scp 相同&#xff1a; 都有拷贝的功能不同&#xff1a; rsync:具有增量复制&#xff0c;每次复制的时候&#xff0c;会扫描对端是否在同路径下有我要发送的一样的文件或者目录&#xff0c;如果&#xff0c;如果存在&#xff0c;则不进行复制。边复制&…...

CSS - 扫盲

文章目录1. 前言2. CSS2.1 css 的引入方式2.2 选择器2.3 CSS 常用属性2.3.1 字体属性2.3.2 文本属性2.3.3 背景属性2.4 圆角矩形2.5 元素的显示模式2.6 盒子模型2.7 弹性布局1. 前言 上文我们简单 将 HTML 过了一遍 &#xff0c; 知道了 HTML 知识表示页面的结构和内容 &#x…...

ChatGPT能完全取代软件开发吗,看看它怎么回答?

最近网上一直疯传&#xff0c;ChatGPT 最可能取代的 10 种工作。具体包括①、技术类工作&#xff1a;程序员、软件工程师、数据分析师②、媒体类工作&#xff1a;广告、内容创作、技术写作、新闻③、法律类工作&#xff1a;法律或律师助理④、市场研究分析师⑤、教师⑥、金融类…...

Vue3学习笔记

一、Ref ref, isRef, shallowRef, triggerRef, customRef ref返回的是es6的一个class类&#xff0c;取值和修改都要加上.valueref 和 shallowRef不能一起写&#xff0c;会引起shallowRef的视图更新ref shallowRef triggerRef <template><div class"home&quo…...

【React】pro-mobile

1.项目介绍 实现react移动端项目 2.目标&#xff1a; 能够应用CRAReactMobxAntd-mobile开发C端项目掌握基于React的C端项目开发流程学会如何应用next优化项目 3.使用技术栈 脚手架&#xff1a;cra dva-cliumi 脚本&#xff1a;ts react版本&#xff1a;react v18 2022年更…...

Substrate 基础教程(Tutorials) -- 授权特定节点

五、授权特定节点 在添加可信节点中&#xff0c;您看到了如何使用一组已知的验证器节点构建一个简单的网络。该教程演示了一个简化版的许可网络&#xff08;permissioned network&#xff09;。在一个被许可的网络中&#xff0c;只有被授权的节点&#xff08;authorized nodes…...

使用qemu-img转换镜像格式

qemu功能强大&#xff0c;详细了解其功能请到官网查看 https://www.qemu.org/docs/master/system/images.html qemu-img能将RAW、qcow2、VMDK、VDI、VHD&#xff08;vpc&#xff09;、VHDX、qcow1或QED格式的镜像转换成VHD格式&#xff0c;也可以实现RAW和VHD格式的互相转换。 …...

Springboot怎么集成Thymeleaf模板引擎?

Thymeleaf介绍Thymeleaf&#xff0c;是一个XML/XHTML/HTML模板引擎&#xff0c;开源的java库&#xff0c;可以用于SpingMVC项目中&#xff0c;用于代替JSP、FreeMarker或者其他的模板引擎&#xff1b;页面与数据分离&#xff0c;提高了开发效率&#xff0c;让代码重用更容易。S…...

LiveGBS国标GB/T28181视频流媒体平台-功能视频集中录制存储云端录像H264|H265|HEVC视频存储

LiveGBS国标GB/T28181视频流媒体平台-视频集中录制存储云端录像H264|H265|HEVC视频存储1、云端录像存储2、手动配置录像2.1、按需录像2.2、一直录像3、录像计划3.1、录像计划入口3.2、新增录像计划3.3、编辑录像计划3.4、关联通道4、查看云端录像4.1、查看录像4.1.1、时间轴模式…...

IntelliJ IDEA如何整合Maven图文教程详解

Maven 1.Maven简述 Maven是一个构建工具,服务与构建.使用Maven配置好项目后,输入简单的命令,如:mvn clean install,Maven会帮我们处理那些繁琐的任务. Maven是跨平台的. Maven最大化的消除了构建的重复. Maven可以帮助我们标准化构建过程.所有的项目都是简单一致的,简化了学习…...

图数据库认证考试 NGCP 错题解析 vol.02:这 10 道题竟无一人全部答对

如果你读过「NebulaGraph 错题解析第一期」&#xff0c;大概知道在错题解析未出来之前&#xff0c;NebulaGraph 专业技能认证 NGCP&#xff08;全称 NebulaGraph Certified Professional&#xff09;的通过率仅有 16.7%。但是&#xff0c;经过上一轮 NebulaGraph 认证考试出题人…...

188888

81. 一个敏捷项目正在进行八次迭代中的第五次迭代。在最后一次迭代计划之后&#xff0c;团队得知市场上出现一个新的竞争对手&#xff0c;有必要更快地加快进程来确保不失去市场份额。 项目经理应该怎么做&#xff1f; A 将竞争对手的功能添加到产品积压待办清单中&#xff0c;…...

华为机试题:HJ99 自守数(python)

文章目录&#xff08;1&#xff09;题目描述&#xff08;2&#xff09;Python3实现&#xff08;3&#xff09;知识点详解1、input()&#xff1a;获取控制台&#xff08;任意形式&#xff09;的输入。输出均为字符串类型。1.1、input() 与 list(input()) 的区别、及其相互转换方…...

如何提高推广邮件的发送成功率?

随着经济的发展&#xff0c;国际之间的贸易往来越加频繁&#xff0c;很多外贸企业需要发送大量的商业推广邮件&#xff0c;来获得销售订单开拓公司业务市场。 随之而来的问题也是越来越多&#xff0c;给众多的外贸企业带来诸多的困扰。外贸企业在发送推广邮件中究竟会遇到什么问…...

电商网页制作素材/百度网站优化排名

告别枯燥&#xff0c;60秒学会一个小例子&#xff01; 目前已发布jackzhenguo/python-small-examples​github.com 点击上面链接&#xff0c;下载PDF版本 包括&#xff1a;Python之基&#xff0c;Python之正&#xff0c;Python之例&#xff0c;Python之能章节&#xff0c;共计1…...

网站设计行业吃香么/营销型网站的特点

K线、订单簿 技术指标&#xff1a;均线MA、MACD、KDJ CAPM: alpha、beta, sharpe 回测 滑点、回撤 K线、订单簿转载于:https://www.cnblogs.com/captain-dl/p/10106500.html...

wordpress如何设置头像/2023年6月疫情恢复

1、安装VS Code 官网下载安装 2、配置python 安装插件 Python 插件 配置launch.json 配置tasks.json 关于tasks.json配置请参开官方文档 经过以上配置你就可以使用Vs code 来开发Python 程序了&#xff01;&#xff01; Vs code 这个开发工具真的是很好用&#xff0c;很多丰富…...

如何把自己做的网站挂网上/优秀营销软文范例800字

1、背景 在离线环境下&#xff08;局域网中&#xff09;的GIS系统中如何使用地图&#xff1f;这里的地图主要指的是地图底图&#xff0c;有了底图切片数据&#xff0c;我们就可以看到地图&#xff0c;在上面加上自己的业务数据图层&#xff0c;进行相关操作。 要在离线环境下看…...

石家庄微网站建设公司/湖北seo服务

什么是Node.js Node是一个服务器端JavaScript解释器。Node的目标是帮助程序员构建高度可伸缩的应用程序&#xff0c;编写能够处理数万条同时连接到一个物理机的连接代码。处理高并发和异步I/O是Node受到开发人员的关注的原因之一。 Node本身运行Google V8 JavaScript引擎&…...

英山县住房和城乡建设局网站/浏览器下载安装2023版本

Liunx要查找某个文件&#xff0c;但不知道放在哪里&#xff0c;可以通过下面命令来查找&#xff1a;&#xff08;1&#xff09;which 查看可执行文件的位置&#xff08;2&#xff09;whereis 查看文件的位置&#xff08;3&#xff09;locate 配合数据库查看文件位置&#xff08…...