File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
frameworks/Java/tio-server
src/main/java/com/litongjava/tio/http/server/config Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -78,20 +78,24 @@ All implementations use the same URLs.
7878```
7979The run is to specify the mysql database
8080```
81- docker run --rm -p 8080:8080 tio-server-benchmark --jdbc.url=jdbc:mysql://192.168.3.9/hello_world --jdbc.user=root --jdbc.pswd=robot_123456#
81+ docker run --rm -p 8080:8080 \
82+ -e JDBC_URL="jdbc:mysql://192.168.3.9/hello_world" \
83+ -e JDBC_USER="root" \
84+ -e JDBC_PSWD="robot_123456" \
85+ tio-server-benchmark
8286```
8387
8488### windows
8589
8690-windows
8791```
88- D:\java\jdk1.8.0_121\bin\java -jar target\tio-server-benchmark-1.0.jar --jdbc.url =jdbc:mysql://192.168.3.9/hello_world --jdbc.user=root --jdbc.pswd =robot_123456#
92+ D:\java\jdk1.8.0_121\bin\java -jar target\tio-server-benchmark-1.0.jar --JDBC_URL =jdbc:mysql://192.168.3.9/hello_world --jdbc.user=root --JDBC_PSWD =robot_123456#
8993```
9094or
9195```
92- set jdbc.url =jdbc:mysql://192.168.3.9/hello_world
96+ set JDBC_URL =jdbc:mysql://192.168.3.9/hello_world
9397set jdbc.user=root
94- set jdbc.pswd =robot_123456#
98+ set JDBC_PSWD =robot_123456#
9599D:\java\jdk1.8.0_121\bin\java -jar target\tio-server-benchmark-1.0.jar
96100```
97101
Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ public class MysqlDbConfig {
99
1010 public void init () {
1111 // start active recored
12- String jdbcUrl = EnviormentUtils .get ("jdbc.url " );
12+ String jdbcUrl = EnviormentUtils .get ("JDBC_URL " );
1313 // String jdbcUrl = "jdbc:mysql://192.168.3.9/hello_world";
1414
15- String jdbcUser = EnviormentUtils .get ("jdbc.user " );
15+ String jdbcUser = EnviormentUtils .get ("JDBC_USER " );
1616// String jdbcUser = "root";
1717
18- String jdbcPswd = EnviormentUtils .get ("jdbc.pswd " );
18+ String jdbcPswd = EnviormentUtils .get ("JDBC_PSWD " );
1919// String jdbcPswd = "robot_123456#";
2020 HikariCpPlugin hikariCpPlugin = new HikariCpPlugin (jdbcUrl , jdbcUser , jdbcPswd );
2121
You can’t perform that action at this time.
0 commit comments