Skip to content

Commit 2a19859

Browse files
committed
增加了日志输出
1 parent 1c13346 commit 2a19859

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

SpringBootDemo/src/main/java/com/xiaour/spring/boot/config/DataBaseConfiguration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public class DataBaseConfiguration implements EnvironmentAware {
2525

2626
private Environment env;
2727

28+
/**
29+
* 初始化yml配置
30+
*/
2831
@Override
2932
public void setEnvironment(Environment env) {
3033
this.env = env;

SpringBootDemo/src/main/java/com/xiaour/spring/boot/controller/TestCtrl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public String get(String key){
5858

5959
/**
6060
* 获取数据库中的用户
61-
* @Description TODO
6261
* @param id
6362
* @return
6463
*/

SpringBootDemo/src/main/resources/application.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#redis服务配置
12
jedis :
23
pool :
34
host : 127.0.0.1
@@ -7,9 +8,11 @@ jedis :
78
maxIdle: 10
89
maxWaitMillis : 100000
910

11+
#服务启动端口
1012
server :
1113
port : 8080
12-
14+
15+
#数据库配置
1316
jdbc:
1417
datasource:
1518
name: test
@@ -38,8 +41,11 @@ mybatis:
3841
mapperLocations: classpath*:/com/xiaour/spring/boot/mapper/*.xml
3942
configLocation: classpath:mybatis-config.xml
4043

41-
# LOGGING
42-
logging:
43-
level:
44-
com.ibatis:DEBUG
44+
# 日志输出
45+
logging:
46+
file: D:/boot.log
47+
level:
48+
com.ibatis:DEBUG
49+
root:DEBUG
50+
4551

0 commit comments

Comments
 (0)