Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
itning committed Mar 11, 2019
1 parent bddfa0b commit d66ece1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
2. 运行镜像

```shell
sudo docker run -p 80:8080 -e MYSQL_URL=192.168.66.88:3306 -it registry.cn-beijing.aliyuncs.com/itning/shw_server
sudo docker run -p 80:8080 -e MYSQL_URL=192.168.66.1:3306 -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=root -it registry.cn-beijing.aliyuncs.com/itning/shw_server:latest
```

**其中MYSQL_URL参数值为MySql数据库服务器地址(带端口号)**
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/top/yunshu/shw/server/ShwServerApplication.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package top.yunshu.shw.server;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
Expand All @@ -15,8 +17,12 @@
@EnableSwagger2
@EnableScheduling
public class ShwServerApplication {
private static final Logger logger = LoggerFactory.getLogger(ShwServerApplication.class);

public static void main(String[] args) {
logger.info("MYSQL::url: " + System.getenv("MYSQL_URL"));
logger.info("MYSQL::username: " + System.getenv("MYSQL_USERNAME"));
logger.info("MYSQL::password: " + System.getenv("MYSQL_PASSWORD"));
SpringApplication.run(ShwServerApplication.class, args);
}

Expand Down

0 comments on commit d66ece1

Please sign in to comment.