mirror of https://github.com/longtai-cn/hippo4j
parent
90c5aeaaf3
commit
1ced0c7786
@ -0,0 +1,40 @@
|
||||
#*************** Spring Boot Related Configurations ***************#
|
||||
### Default Web Context Path
|
||||
# server.servlet.contextPath=/hippo4j
|
||||
|
||||
### Server Startup Port
|
||||
server.port=6691
|
||||
|
||||
### Server Tomcat
|
||||
server.tomcat.accesslog.enabled=true
|
||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||
|
||||
### Default Current Work Dir
|
||||
server.tomcat.basedir=
|
||||
|
||||
#*************** Dynamic Thread Pool Custom Configuration ***************#
|
||||
### Custom Logging Tenant
|
||||
tenant=hippo4j
|
||||
|
||||
|
||||
#*************** Config Module Related Configurations ***************#
|
||||
### Hikari Datasource
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/hippo_manager?characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
||||
spring.datasource.hikari.pool-name=Hikari
|
||||
spring.datasource.hikari.connectionTimeout=30000
|
||||
spring.datasource.hikari.idleTimeout=30000
|
||||
spring.datasource.hikari.validationTimeout=3000
|
||||
spring.datasource.hikari.maxLifetime=120000
|
||||
spring.datasource.hikari.loginTimeout=5
|
||||
spring.datasource.hikari.minimumIdle=5
|
||||
spring.datasource.hikari.maximumPoolSize=15
|
||||
spring.datasource.hikari.connection-test-query=SELECT 1
|
||||
|
||||
### Mybatis-Plus Config
|
||||
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
mybatis-plus.global-config.db-config.logic-delete-field=delFlag
|
||||
mybatis-plus.global-config.db-config.logic-delete-value=1
|
||||
mybatis-plus.global-config.db-config.logic-not-delete-value=0
|
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<configuration debug="false" scan="false">
|
||||
<springProperty scope="context" name="appName" source="spring.application.name" defaultValue="hippo4j-server" />
|
||||
<springProperty scope="context" name="logPath" source="hippo4j.logs.path" defaultValue="${hippo4j.home}/logs" />
|
||||
<springProperty scope="context" name="logLevel" source="logging.level.root" defaultValue="INFO" />
|
||||
|
||||
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5level %msg%xEx%n%n" />
|
||||
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="file-all" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logPath}/${appName}-info.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${logPath}/${appName}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="file-error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logPath}/${appName}-error.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${logPath}/${appName}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<root level="${logLevel}">
|
||||
<appender-ref ref="file-all" />
|
||||
<appender-ref ref="file-error" />
|
||||
</root>
|
||||
</configuration>
|
Loading…
Reference in new issue