Bläddra i källkod

Merge branch '4.7.0' of https://gitee.com/mingSoft/MCMS.git into 4.7.0

yinxr 6 år sedan
förälder
incheckning
fdf54c8b02

+ 80 - 19
pom.xml

@@ -6,9 +6,9 @@
 
 	<groupId>net.mingsoft</groupId>
 	<artifactId>mcms</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
-	<name>mcms1</name>
-	<packaging>war</packaging>
+	<version>4.7.0-SNAPSHOT</version>
+	<name>ms-mcms</name>
+	<packaging>jar</packaging>
 	<properties>
 		<java.version>1.8</java.version>
 	</properties>
@@ -51,12 +51,6 @@
 		</dependency>
 		<dependency>
 			<groupId>net.mingsoft</groupId>
-			<artifactId>ms-basic</artifactId>
-			<version>1.0.8.1-SNAPSHOT</version>
-			<type>war</type>
-		</dependency>
-		<dependency>
-			<groupId>net.mingsoft</groupId>
 			<artifactId>ms-mdiy</artifactId>
 			<version>1.0.7-SNAPSHOT</version>
 			<classifier>classes</classifier>
@@ -64,27 +58,94 @@
 		</dependency>
 		<dependency>
 			<groupId>net.mingsoft</groupId>
-			<artifactId>ms-mdiy</artifactId>
-			<version>1.0.7-SNAPSHOT</version>
-			<type>war</type>
-		</dependency>
-		<dependency>
-			<groupId>net.mingsoft</groupId>
 			<artifactId>ms-mpeople</artifactId>
 			<version>1.0.7-SNAPSHOT</version>
 			<classifier>classes</classifier>
 			<scope>provided</scope>
 		</dependency>
+
+		<!-- swagger2接口文档依赖 -->
 		<dependency>
-			<groupId>net.mingsoft</groupId>
-			<artifactId>ms-mpeople</artifactId>
-			<version>1.0.7-SNAPSHOT</version>
-			<type>war</type>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger2</artifactId>
+			<version>2.9.2</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-core</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-beans</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-context</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-context-support</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-aop</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-tx</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-orm</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-jdbc</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-web</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-webmvc</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-oxm</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger-ui</artifactId>
+			<version>2.9.2</version>
 		</dependency>
 	</dependencies>
 	<build>
 		<finalName>ms-mcms</finalName>
 		<plugins>
+		    <!-- docker部署 
+		     
+			<plugin>
+				<groupId>com.spotify</groupId>
+				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.0</version>
+				<configuration>
+					<dockerHost>http://localhost</dockerHost>
+					<imageName>ms-mcms</imageName>
+					<baseImage>java</baseImage>
+					<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
+					<resources>
+						<resource>
+							<targetPath>/</targetPath>
+							<directory>${project.build.directory}</directory>
+							<include>${project.build.finalName}.jar</include>
+						</resource>
+					</resources>
+				</configuration>
+			</plugin>
+			-->
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>

+ 5 - 0
src/main/resources/Dockerfile

@@ -0,0 +1,5 @@
+FROM java
+VOLUME /tmp
+ADD docker-springboot-0.0.1-SNAPSHOT.jar app.jar
+RUN bash -c 'touch /app.jar' ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

+ 7 - 0
src/main/resources/application-pro.yml

@@ -0,0 +1,7 @@
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
+    username: root
+    password: root
+    filters: wall,mergeStat
+    type: com.alibaba.druid.pool.DruidDataSource

+ 7 - 0
src/main/resources/application-test.yml

@@ -0,0 +1,7 @@
+spring:
+  datasource:
+    url: jdbc:mysql://192.168.1.18:3306/mcms-4.7.0?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
+    username: root
+    password: root
+    filters: wall,mergeStat
+    type: com.alibaba.druid.pool.DruidDataSource