Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
drp
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
drp
Commits
f7ac3155
Commit
f7ac3155
authored
Mar 17, 2015
by
Yonggang Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加开发和生产环境的配置切换
parent
1c97167c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
72 deletions
+102
-72
.gitignore
.gitignore
+2
-1
filters/prod/jdbc.properties
filters/prod/jdbc.properties
+2
-0
pom.xml
pom.xml
+97
-70
src/main/resources/jdbc.properties
src/main/resources/jdbc.properties
+1
-1
No files found.
.gitignore
View file @
f7ac3155
...
...
@@ -2,4 +2,5 @@
/target/
.classpath
.project
.settings
\ No newline at end of file
.settings
/filters/dev
\ No newline at end of file
filters/prod/jdbc.properties
0 → 100644
View file @
f7ac3155
jdbc.username
=
root
jdbc.password
=
""
pom.xml
View file @
f7ac3155
<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/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.originspark.drp
</groupId>
<artifactId>
drp
</artifactId>
<packaging>
war
</packaging>
<version>
1.0-SNAPSHOT
</version>
<name>
drp Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.originspark.drp
</groupId>
<artifactId>
drp
</artifactId>
<packaging>
war
</packaging>
<version>
1.0-SNAPSHOT
</version>
<name>
drp Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
<properties>
<junit.version>
4.11
</junit.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<jdk.version>
1.7
</jdk.version>
<hibernate.version>
4.2.0.Final
</hibernate.version>
<properties>
<junit.version>
4.11
</junit.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<jdk.version>
1.7
</jdk.version>
<hibernate.version>
4.2.0.Final
</hibernate.version>
<mysql.connector.version>
5.1.21
</mysql.connector.version>
<spring.version>
3.2.2.RELEASE
</spring.version>
</properties>
</properties>
<dependencies>
<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.1
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<dependencies>
<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.1
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
jstl
</artifactId>
<version>
1.2
</version>
</dependency>
<!-- DB related dependencies -->
<dependency>
<!-- DB related dependencies -->
<dependency>
<groupId>
org.hibernate
</groupId>
<artifactId>
hibernate-core
</artifactId>
<version>
${hibernate.version}
</version>
...
...
@@ -87,7 +87,7 @@
<artifactId>
spring-orm
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
...
...
@@ -128,46 +128,73 @@
<artifactId>
jackson-databind
</artifactId>
<version>
2.5.1
</version>
</dependency>
</dependencies>
<build>
<finalName>
drp
</finalName>
</dependencies>
<profiles>
<profile>
<id>
dev
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<properties>
<filters.env>
dev
</filters.env>
</properties>
</profile>
<profile>
<id>
prod
</id>
<properties>
<filters.env>
prod
</filters.env>
</properties>
</profile>
</profiles>
<build>
<finalName>
drp
</finalName>
<sourceDirectory>
src/main/java
</sourceDirectory>
<testSourceDirectory>
src/test/java
</testSourceDirectory>
<sourceDirectory>
src/main/java
</sourceDirectory>
<testSourceDirectory>
src/test/java
</testSourceDirectory>
<resources>
<resource>
<directory>
${project.basedir}/src/main/resources
</directory>
<filtering>
true
</filtering>
</resource>
</resources>
<filters>
<filter>
${basedir}/filters/${filters.env}/jdbc.properties
</filter>
</filters>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
2.5.1
</version>
<configuration>
<encoding>
UTF-8
</encoding>
<source>
${jdk.version}
</source>
<target>
${jdk.version}
</target>
</configuration>
<dependencies>
<dependency>
<groupId>
org.codehaus.plexus
</groupId>
<artifactId>
plexus-compiler-javac
</artifactId>
<version>
1.8.1
</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>
org.apache.tomcat.maven
</groupId>
<artifactId>
tomcat7-maven-plugin
</artifactId>
<version>
2.1
</version>
<configuration>
<port>
8080
</port>
<path>
/drp
</path>
<uriEncoding>
UTF-8
</uriEncoding>
<finalName>
drp
</finalName>
<server>
tomcat7
</server>
</configuration>
</plugin>
</plugins>
</build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
2.5.1
</version>
<configuration>
<encoding>
UTF-8
</encoding>
<source>
${jdk.version}
</source>
<target>
${jdk.version}
</target>
</configuration>
<dependencies>
<dependency>
<groupId>
org.codehaus.plexus
</groupId>
<artifactId>
plexus-compiler-javac
</artifactId>
<version>
1.8.1
</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>
org.apache.tomcat.maven
</groupId>
<artifactId>
tomcat7-maven-plugin
</artifactId>
<version>
2.1
</version>
<configuration>
<port>
8080
</port>
<path>
/drp
</path>
<uriEncoding>
UTF-8
</uriEncoding>
<finalName>
drp
</finalName>
<server>
tomcat7
</server>
</configuration>
</plugin>
</plugins>
</build>
</project>
src/main/resources/jdbc.properties
View file @
f7ac3155
...
...
@@ -11,7 +11,7 @@ sql.type=mysql
jdbc.driver
=
com.mysql.jdbc.Driver
jdbc.url
=
jdbc:mysql://localhost:3306/drp?useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
root
jdbc.password
=
""
hibernate.dialect
=
org.hibernate.dialect.MySQL5InnoDBDialect
#hibernate settings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment