Skip to content

Commit 4421f81

Browse files
committed
修改@async测试
1 parent dba5acf commit 4421f81

20 files changed

+181
-39
lines changed

.classpath

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<attributes>
1616
<attribute name="optional" value="true"/>
1717
<attribute name="maven.pomderived" value="true"/>
18+
<attribute name="test" value="true"/>
1819
</attributes>
1920
</classpathentry>
2021
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
@@ -28,5 +29,22 @@
2829
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
2930
</attributes>
3031
</classpathentry>
32+
<classpathentry kind="src" path="target/generated-sources/annotations">
33+
<attributes>
34+
<attribute name="optional" value="true"/>
35+
<attribute name="maven.pomderived" value="true"/>
36+
<attribute name="ignore_optional_problems" value="true"/>
37+
<attribute name="m2e-apt" value="true"/>
38+
</attributes>
39+
</classpathentry>
40+
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
41+
<attributes>
42+
<attribute name="optional" value="true"/>
43+
<attribute name="maven.pomderived" value="true"/>
44+
<attribute name="ignore_optional_problems" value="true"/>
45+
<attribute name="m2e-apt" value="true"/>
46+
<attribute name="test" value="true"/>
47+
</attributes>
48+
</classpathentry>
3149
<classpathentry kind="output" path="target/classes"/>
3250
</classpath>

.factorypath

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<factorypath>
2+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/2.1.2.RELEASE/spring-boot-starter-web-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
3+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/2.1.2.RELEASE/spring-boot-starter-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
4+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/2.1.2.RELEASE/spring-boot-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
5+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/2.1.2.RELEASE/spring-boot-autoconfigure-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
6+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/2.1.2.RELEASE/spring-boot-starter-logging-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
7+
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar" enabled="true" runInBatchMode="false"/>
8+
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar" enabled="true" runInBatchMode="false"/>
9+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-to-slf4j/2.11.1/log4j-to-slf4j-2.11.1.jar" enabled="true" runInBatchMode="false"/>
10+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar" enabled="true" runInBatchMode="false"/>
11+
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
12+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.1.4.RELEASE/spring-core-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
13+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/5.1.4.RELEASE/spring-jcl-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
14+
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar" enabled="true" runInBatchMode="false"/>
15+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-json/2.1.2.RELEASE/spring-boot-starter-json-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
16+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.9.8/jackson-databind-2.9.8.jar" enabled="true" runInBatchMode="false"/>
17+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar" enabled="true" runInBatchMode="false"/>
18+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.9.8/jackson-core-2.9.8.jar" enabled="true" runInBatchMode="false"/>
19+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.8/jackson-datatype-jdk8-2.9.8.jar" enabled="true" runInBatchMode="false"/>
20+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.8/jackson-datatype-jsr310-2.9.8.jar" enabled="true" runInBatchMode="false"/>
21+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.8/jackson-module-parameter-names-2.9.8.jar" enabled="true" runInBatchMode="false"/>
22+
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/validator/hibernate-validator/6.0.14.Final/hibernate-validator-6.0.14.Final.jar" enabled="true" runInBatchMode="false"/>
23+
<factorypathentry kind="VARJAR" id="M2_REPO/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar" enabled="true" runInBatchMode="false"/>
24+
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar" enabled="true" runInBatchMode="false"/>
25+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.4.0/classmate-1.4.0.jar" enabled="true" runInBatchMode="false"/>
26+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/5.1.4.RELEASE/spring-web-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
27+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/5.1.4.RELEASE/spring-beans-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
28+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/5.1.4.RELEASE/spring-webmvc-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
29+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/5.1.4.RELEASE/spring-context-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
30+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/5.1.4.RELEASE/spring-expression-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
31+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/2.1.2.RELEASE/spring-boot-starter-tomcat-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
32+
<factorypathentry kind="VARJAR" id="M2_REPO/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar" enabled="true" runInBatchMode="false"/>
33+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/9.0.14/tomcat-embed-core-9.0.14.jar" enabled="true" runInBatchMode="false"/>
34+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-el/9.0.14/tomcat-embed-el-9.0.14.jar" enabled="true" runInBatchMode="false"/>
35+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.14/tomcat-embed-websocket-9.0.14.jar" enabled="true" runInBatchMode="false"/>
36+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-jasper/9.0.14/tomcat-embed-jasper-9.0.14.jar" enabled="true" runInBatchMode="false"/>
37+
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/jdt/ecj/3.15.0/ecj-3.15.0.jar" enabled="true" runInBatchMode="false"/>
38+
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-starter/1.2.0/mybatis-spring-boot-starter-1.2.0.jar" enabled="true" runInBatchMode="false"/>
39+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/2.1.2.RELEASE/spring-boot-starter-jdbc-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
40+
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/3.2.0/HikariCP-3.2.0.jar" enabled="true" runInBatchMode="false"/>
41+
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/>
42+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/5.1.4.RELEASE/spring-jdbc-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
43+
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/1.2.0/mybatis-spring-boot-autoconfigure-1.2.0.jar" enabled="true" runInBatchMode="false"/>
44+
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis/3.4.2/mybatis-3.4.2.jar" enabled="true" runInBatchMode="false"/>
45+
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis-spring/1.3.1/mybatis-spring-1.3.1.jar" enabled="true" runInBatchMode="false"/>
46+
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.13/mysql-connector-java-8.0.13.jar" enabled="true" runInBatchMode="false"/>
47+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/2.1.2.RELEASE/spring-boot-starter-aop-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
48+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/5.1.4.RELEASE/spring-aop-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
49+
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.2/aspectjweaver-1.9.2.jar" enabled="true" runInBatchMode="false"/>
50+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-cache/2.1.2.RELEASE/spring-boot-starter-cache-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
51+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/5.1.4.RELEASE/spring-context-support-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
52+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-amqp/2.1.2.RELEASE/spring-boot-starter-amqp-2.1.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
53+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-messaging/5.1.4.RELEASE/spring-messaging-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
54+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/amqp/spring-rabbit/2.1.3.RELEASE/spring-rabbit-2.1.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
55+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/amqp/spring-amqp/2.1.3.RELEASE/spring-amqp-2.1.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
56+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/retry/spring-retry/1.2.3.RELEASE/spring-retry-1.2.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
57+
<factorypathentry kind="VARJAR" id="M2_REPO/com/rabbitmq/amqp-client/5.4.3/amqp-client-5.4.3.jar" enabled="true" runInBatchMode="false"/>
58+
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/5.1.4.RELEASE/spring-tx-5.1.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
59+
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.4/lombok-1.18.4.jar" enabled="true" runInBatchMode="false"/>
60+
</factorypath>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.apt.aptEnabled=true
3+
org.eclipse.jdt.apt.genSrcDir=target\\generated-sources\\annotations
4+
org.eclipse.jdt.apt.genTestSrcDir=target\\generated-test-sources\\test-annotations

.settings/org.eclipse.jdt.core.prefs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
eclipse.preferences.version=1
22
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
34
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
45
org.eclipse.jdt.core.compiler.compliance=1.8
56
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
67
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
78
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
9+
org.eclipse.jdt.core.compiler.processAnnotations=enabled
10+
org.eclipse.jdt.core.compiler.release=disabled
811
org.eclipse.jdt.core.compiler.source=1.8

.settings/org.eclipse.wst.common.component

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
55
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
66
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
7+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/annotations"/>
78
<property name="java-output-path" value="/springboot-jsp/target/classes"/>
89
<property name="context-root" value="springboot"/>
910
</wb-module>

.settings/org.eclipse.wst.common.project.facet.core.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<fixed facet="wst.jsdt.web"/>
44
<installed facet="java" version="1.8"/>
55
<installed facet="wst.jsdt.web" version="1.0"/>
6-
<installed facet="jst.web" version="3.1"/>
6+
<installed facet="jst.web" version="4.0"/>
77
</faceted-project>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<parent>
1111
<groupId>org.springframework.boot</groupId>
1212
<artifactId>spring-boot-starter-parent</artifactId>
13-
<version>2.0.1.RELEASE</version>
13+
<version>2.1.2.RELEASE</version>
1414
<relativePath>../spring-boot-starter-parent</relativePath>
1515
</parent>
1616
<dependencies>

src/main/java/com/xwj/DemoApplication.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
import org.springframework.boot.SpringApplication;
55
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
66
import org.springframework.context.annotation.ComponentScan;
7+
import org.springframework.scheduling.annotation.EnableAsync;
78

8-
@ComponentScan(basePackages = { "com.xwj.controller", "com.xwj.service", "com.xwj.config", "com.xwj.app", "com.xwj.tasks", "com.xwj.datasource" })
9+
@ComponentScan(basePackages = { "com.xwj.controller", "com.xwj.service", "com.xwj.tasks" })
910
@MapperScan(basePackages = "com.xwj.mapper")
1011
//@EnableCaching //开启缓存
1112
//@EnableScheduling //开启定时任务
12-
//@EnableAsync //开启异步调用
13+
@EnableAsync // 开启异步调用
1314
@EnableAutoConfiguration
1415
public class DemoApplication {
1516

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.xwj.controller;
2+
3+
import org.springframework.beans.factory.annotation.Autowired;
4+
import org.springframework.web.bind.annotation.RequestMapping;
5+
import org.springframework.web.bind.annotation.RestController;
6+
7+
import com.xwj.service.AsyncService;
8+
9+
/**
10+
* 异步调用
11+
*
12+
* @author xwj
13+
*/
14+
@RestController
15+
@RequestMapping("async")
16+
public class AsyncController {
17+
18+
@Autowired
19+
private AsyncService asyncService;
20+
21+
@RequestMapping("/test")
22+
public String async() {
23+
System.out.println("####AsyncController#### 1");
24+
asyncService.doAsync1();
25+
// asyncService.doAsync2();
26+
System.out.println("####AsyncController#### 2");
27+
return "success";
28+
}
29+
30+
}

src/main/java/com/xwj/controller/IndexController.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ public void deleteUser(String id){
4242
userService.deleteUser(id);
4343
}
4444

45-
@RequestMapping("/async")
46-
public String async(){
47-
System.out.println("####IndexController#### 1");
48-
userService.sendSms();
49-
System.out.println("####IndexController#### 4");
50-
return "success";
51-
}
52-
5345
// @RequestMapping("/insert2")
5446
// public void insertUser2(){
5547
// user2Service.addDoc();
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package com.xwj.service;
2+
3+
import java.util.concurrent.TimeUnit;
4+
5+
import org.springframework.scheduling.annotation.Async;
6+
import org.springframework.stereotype.Service;
7+
8+
@Service
9+
public class AsyncService {
10+
11+
@Async
12+
public void doAsync1() {
13+
System.out.println("####doAsync1#### 3");
14+
try {
15+
TimeUnit.SECONDS.sleep(2);
16+
} catch (InterruptedException e) {
17+
e.printStackTrace();
18+
}
19+
System.out.println("####doAsync1#### 4");
20+
}
21+
22+
@Async
23+
public void doAsync2() {
24+
System.out.println("####doAsync2#### 5");
25+
try {
26+
TimeUnit.SECONDS.sleep(2);
27+
} catch (InterruptedException e) {
28+
e.printStackTrace();
29+
}
30+
doAsync3();
31+
System.out.println("####doAsync2#### 6");
32+
}
33+
34+
/**
35+
* 在同一个类中,一个方法调用另外一个有注解(比如@Async,@Transational)的方法,注解是不会生效的
36+
*/
37+
@Async
38+
public void doAsync3() {
39+
System.out.println("####doAsync3#### 7");
40+
try {
41+
TimeUnit.SECONDS.sleep(2);
42+
} catch (InterruptedException e) {
43+
e.printStackTrace();
44+
}
45+
System.out.println("####doAsync3#### 8");
46+
}
47+
48+
}

src/main/java/com/xwj/service/UserService.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package com.xwj.service;
22

33
import java.util.List;
4-
import java.util.stream.IntStream;
54

65
import org.springframework.beans.factory.annotation.Autowired;
76
import org.springframework.cache.annotation.CacheEvict;
87
import org.springframework.cache.annotation.Cacheable;
9-
import org.springframework.scheduling.annotation.Async;
108
import org.springframework.stereotype.Service;
119
import org.springframework.transaction.annotation.Propagation;
1210
import org.springframework.transaction.annotation.Transactional;
@@ -48,17 +46,4 @@ public void deleteUser(String id) {
4846
userMapper.deleteUser(id);
4947
}
5048

51-
@Async
52-
public void sendSms() {
53-
System.out.println("####sendSms#### 2");
54-
IntStream.range(0, 5).forEach(d -> {
55-
try {
56-
Thread.sleep(1000);
57-
} catch (InterruptedException e) {
58-
e.printStackTrace();
59-
}
60-
});
61-
System.out.println("####sendSms#### 3");
62-
}
63-
6449
}

src/main/resources/application.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server:
2-
port: 8080
2+
port: 18080
33
context-path: /xwj
44
tomcat:
55
uri-encoding: UTF-8
@@ -13,11 +13,11 @@ spring:
1313
url: jdbc:mysql://localhost:3306/xwj?autoReconnect=true&failOverReadOnly=false&createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf8
1414
username: root
1515
password: 123456
16-
gwdb:
17-
driverClassName: com.mysql.jdbc.Driver
18-
url: jdbc:mysql://localhost:3306/e-travel?autoReconnect=true&failOverReadOnly=false&createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf8
19-
username: root
20-
password: 123456
16+
# gwdb:
17+
# driverClassName: com.mysql.jdbc.Driver
18+
# url: jdbc:mysql://localhost:3306/e-travel?autoReconnect=true&failOverReadOnly=false&createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf8
19+
# username: root
20+
# password: 123456
2121
profiles:
2222
active: prd
2323

target/classes/application.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server:
2-
port: 8080
2+
port: 18080
33
context-path: /xwj
44
tomcat:
55
uri-encoding: UTF-8
@@ -13,11 +13,11 @@ spring:
1313
url: jdbc:mysql://localhost:3306/xwj?autoReconnect=true&failOverReadOnly=false&createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf8
1414
username: root
1515
password: 123456
16-
gwdb:
17-
driverClassName: com.mysql.jdbc.Driver
18-
url: jdbc:mysql://localhost:3306/e-travel?autoReconnect=true&failOverReadOnly=false&createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf8
19-
username: root
20-
password: 123456
16+
# gwdb:
17+
# driverClassName: com.mysql.jdbc.Driver
18+
# url: jdbc:mysql://localhost:3306/e-travel?autoReconnect=true&failOverReadOnly=false&createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf8
19+
# username: root
20+
# password: 123456
2121
profiles:
2222
active: prd
2323

-64 Bytes
Binary file not shown.
Binary file not shown.
2 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-1.29 KB
Binary file not shown.
-56 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)