Commit b93952d0 authored by 李志平's avatar 李志平

配置日志

parent b9ea9410
......@@ -9,7 +9,11 @@
<version>2.1.6.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.dianmi</groupId>
<artifactId>hrotooa</artifactId>
<version>1.0</version>
<name>hrotooa</name>
<description>HRO对接OA</description>
<properties>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
......@@ -39,13 +43,6 @@
<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
<spring-boot-starter-actuator.version>2.1.6.RELEASE</spring-boot-starter-actuator.version>
</properties>
<groupId>com.example</groupId>
<artifactId>springbootbemo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springbootbemo</name>
<description>Demo project for Spring Boot</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
......@@ -93,8 +90,6 @@
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
......@@ -124,6 +119,10 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
......
package com.dianmi.config.MyBatisPlus;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
......@@ -10,6 +12,7 @@ import org.springframework.context.annotation.Configuration;
* Create By Administrator on 2020/6/12.
*/
@Configuration
@MapperScan("com.dianmi.mapper")
public class MyBatisPlusConfig {
private final static Logger logger = LoggerFactory.getLogger(MyBatisPlusConfig.class);
......
......@@ -34,6 +34,33 @@ mybatis-plus:
global-config:
banner: false
mapper-locations: classpath:mapper/*.xml
configuration:
map-underscore-to-camel-case: false
cache-enabled: true
logging:
file:
max-size: 100MB
max-history: 30
name: /data/logs/hrotooa.log
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %class{36}#%M [line:%L] %cyan(%logger{50}) - %highlight(%msg) %n"
file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %class{36}#%M [line:%L] %cyan(%logger{50}) - %highlight(%msg) %n"
level:
root: INFO
web: DEBUG
'[com.dianmi]': DEBUG
org.springframework.web: INFO
com.apache.ibatis: DEBUG
java.sql.Connection: trace
java.sql.Statement: trace
java.sql.PreparedStatement: trace
java.sql.ResultSet: debug
net.sf.ehcache: debug
org.mybatis.caches.ehcache: debug
org.apache.camel: trace
# 暴露端点
management:
endpoints:
web:
exposure:
include: '*'
endpoint:
health:
show-details: always
\ No newline at end of file
package com.dianmi;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ApplicationTests {
@Test
void contextLoads() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment