Parcourir la source

升级spring-boot版本

lvzhikai il y a 3 ans
Parent
commit
5a800735e3
3 fichiers modifiés avec 2 ajouts et 79 suppressions
  1. 0 55
      javash/sh.sh
  2. 2 8
      pom.xml
  3. 0 16
      src/test/java/com/unis/module/eureka/EurekaApplicationTests.java

+ 0 - 55
javash/sh.sh

@@ -1,55 +0,0 @@
1
-#java env
2
-#增加操作权限:  chmod +x *.sh
3
-#编译.sh文件命令: sed -i 's/\r$//' *.sh
4
-#启动命令:  ./sh.sh start  停止 ./sh.sh stop
5
-#shell脚本有时候调用linux的环境变量会有问题,所以这里还是把用到的java环境再设置一下
6
-#export JAVA_HOME=/usr/bin/java/jdk1.8.0_171/
7
-
8
-#工程上级文件名称
9
-FILE_NAME=eureka
10
-
11
-SERVICE_DIR=/usr/local/jar/$FILE_NAME
12
-
13
-#工程名称
14
-SERVICE_NAME=eureka
15
-
16
-APP_JAR=$SERVICE_NAME\.jar
17
-#启动app的时候,将进程的pid保存在这里,方便以后杀死进程用
18
-APP_PID=$SERVICE_NAME\.pid
19
-
20
-cd $SERVICE_DIR
21
-
22
-case "$1" in
23
-
24
-    start)
25
-        #/dev/null 就不会有nohup.out文件了。
26
-        nohup java -Xms32m -Xmx128m -Dloader.path="lib/" -jar $APP_JAR >log.file 2>&1 &
27
-        #将pid写入文件
28
-        echo $! > $SERVICE_DIR/$APP_PID
29
-        echo "===== start $SERVICE_NAME"
30
-        ;;
31
-
32
-    stop)
33
-        kill `cat $APP_PID`
34
-        #删除掉pid文件
35
-        rm -f $SERVICE_DIR/$APP_PID
36
-        rm -f $SERVICE_DIR/log.file
37
-        #查看是不是杀死进程了
38
-        sleep 5
39
-                #获得进程号,复制号两边不能留空格
40
-                pid=`ps -ef | grep -w $SERVICE_NAME | grep -v grep | awk '{print $2}'`
41
-        #判断相等两边要留空格
42
-        if ["$pid" == ""];then
43
-            echo "=== kill successfully "
44
-        else
45
-            echo "===== kill fail and try to kill -9"
46
-            echo "====  the pid is  $pid"
47
-            kill -9 $pid
48
-        fi
49
-        echo "stop finished"
50
-        ;;
51
-    *)
52
-        echo "please use start or stop 参数"
53
-        ;;
54
-esac
55
-exit 0

+ 2 - 8
pom.xml

@@ -14,7 +14,7 @@
14 14
 	<parent>
15 15
 		<groupId>org.springframework.boot</groupId>
16 16
 		<artifactId>spring-boot-starter-parent</artifactId>
17
-		<version>2.0.3.RELEASE</version>
17
+		<version>2.3.12.RELEASE</version>
18 18
 		<relativePath/> <!-- lookup parent from repository -->
19 19
 	</parent>
20 20
 
@@ -22,7 +22,7 @@
22 22
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23 23
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24 24
 		<java.version>1.8</java.version>
25
-		<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
25
+		<spring-cloud.version>Hoxton.SR12</spring-cloud.version>
26 26
 	</properties>
27 27
 
28 28
 	<dependencies>
@@ -33,12 +33,6 @@
33 33
 
34 34
 		<dependency>
35 35
 			<groupId>org.springframework.boot</groupId>
36
-			<artifactId>spring-boot-starter-test</artifactId>
37
-			<scope>test</scope>
38
-		</dependency>
39
-
40
-		<dependency>
41
-			<groupId>org.springframework.boot</groupId>
42 36
 			<artifactId>spring-boot-starter-security</artifactId>
43 37
 		</dependency>
44 38
 	</dependencies>

+ 0 - 16
src/test/java/com/unis/module/eureka/EurekaApplicationTests.java

@@ -1,16 +0,0 @@
1
-package com.unis.module.eureka;
2
-
3
-import org.junit.Test;
4
-import org.junit.runner.RunWith;
5
-import org.springframework.boot.test.context.SpringBootTest;
6
-import org.springframework.test.context.junit4.SpringRunner;
7
-
8
-@RunWith(SpringRunner.class)
9
-@SpringBootTest
10
-public class EurekaApplicationTests {
11
-
12
-	@Test
13
-	public void contextLoads() {
14
-	}
15
-
16
-}