Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
847b35aa
提交
847b35aa
编写于
1月 13, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
引用修复
上级
e580fbb4
变更
16
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
376 行增加
和
326 行删除
+376
-326
pom.xml.hbs
...c/main/resources/templ/r7/{{projectName}}-app/pom.xml.hbs
+0
-13
{{app.codeName}}Application.java.hbs
...ckageName}}/{{apps}}/{{app.codeName}}Application.java.hbs
+1
-18
application-{{apps}}-prod.yml.hbs
...ps}}/src/main/resources/application-{{apps}}-prod.yml.hbs
+65
-1
application.yml.hbs
...ame}}-app-{{apps}}/src/main/resources/application.yml.hbs
+1
-1
logback-spring.xml.hbs
...}}-app-{{apps}}/src/main/resources/logback-spring.xml.hbs
+8
-7
pom.xml.hbs
.../main/resources/templ/r7/{{projectName}}-boot/pom.xml.hbs
+0
-5
DevBootApplication.java.hbs
...src/main/java/{{packageName}}/DevBootApplication.java.hbs
+4
-4
logback-spring.xml.hbs
...jectName}}-boot/src/main/resources/logback-spring.xml.hbs
+8
-7
pom.xml.hbs
.../main/resources/templ/r7/{{projectName}}-core/pom.xml.hbs
+65
-25
{{entities@SQL}}ServiceImpl.java.hbs
...dules}}/service/impl/{{entities@SQL}}ServiceImpl.java.hbs
+15
-13
application-sys.yml.hbs
...ectName}}-core/src/main/resources/application-sys.yml.hbs
+1
-0
pom.xml.hbs
...sources/templ/r7/{{projectName}}-dependencies/pom.xml.hbs
+144
-228
{{system.codeName}}{{api.codeName}}Application.java.hbs
...}/{{system.codeName}}{{api.codeName}}Application.java.hbs
+4
-4
application-{{apis}}-prod.yml.hbs
...is}}/src/main/resources/application-{{apis}}-prod.yml.hbs
+6
-0
application.yml.hbs
...-provider-{{apis}}/src/main/resources/application.yml.hbs
+5
-0
logback-spring.xml.hbs
...ovider-{{apis}}/src/main/resources/logback-spring.xml.hbs
+49
-0
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/pom.xml.hbs
浏览文件 @
847b35aa
...
...
@@ -21,19 +21,6 @@
</modules>
<dependencies>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-commons
</artifactId>
</dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<artifactId>
jjwt
</artifactId>
<version>
0.9.1
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-zuul
</artifactId>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/java/{{packageName}}/{{apps}}/{{app.codeName}}Application.java.hbs
浏览文件 @
847b35aa
...
...
@@ -9,11 +9,9 @@ import org.springframework.cloud.openfeign.FeignClientsConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import cn.ibizlab.util.web.SearchContextHandlerMethodArgumentResolver;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
...
...
@@ -23,31 +21,16 @@ import java.util.List;
})
@EnableDiscoveryClient
@Configuration
@EnableFeignClients(basePackages = {"
{{
packageName
}}
"
})
@EnableFeignClients(basePackages = {"
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
","cn.ibizlab.util"
})
@EnableZuulProxy
@ComponentScan(basePackages = {"
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
","cn.ibizlab.util"})
@MapperScan("
{{
packageName
}}
.*.mapper")
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
{{#
unless
system
.
enableMongo
}}
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
{{/
unless
}}
{{#if
system
.
enableDS
}}
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure.class
{{/if}}
})
public class
{{
app
.
codeName
}}
Application extends WebMvcConfigurerAdapter {
@Autowired
SearchContextHandlerMethodArgumentResolver resolver;
public static void main(String[] args) {
SpringApplication.run(
{{
app
.
codeName
}}
Application.class, args);
}
@Override
public void addArgumentResolvers(List
<HandlerMethodArgumentResolver>
argumentResolvers) {
super.addArgumentResolvers(argumentResolvers);
argumentResolvers.add(resolver);
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/resources/application-{{apps}}-prod.yml.hbs
浏览文件 @
847b35aa
server:
port:
{{#if
app
.
httpPort
}}{{
app
.
httpPort
}}{{else}}
8080
{{/if}}
spring:
cache:
redis:
time-to-live: 3600
caffeine:
spec: initialCapacity=5,maximumSize=500,expireAfterWrite=3600s
redis:
host: 127.0.0.1
port: 6379
password:
database: 0
lettuce:
pool:
max-active: 32
max-wait: 300ms
max-idle: 16
min-idle: 8
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
#阿里sentinel熔断器
feign:
httpclient:
enabled: true
sentinel:
enabled: true
compression:
request:
enabled: true
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 10240
response:
enabled: true
#Log配置
logging:
level:
{{
packageName
}}
: info
cn.ibizlab: debug
{{
packageName
}}
: debug
org.springframework.boot.autoconfigure: ERROR
#zuul网关超时设置
ribbon:
ReadTimeout: 60000
ConnectTimeout: 60000
#系统是否开启权限验证、是否开启缓存
#缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz:
systemid:
{{
system
.
codeName
}}
enablePermissionValid: true
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
### 启用Gzip压缩
server:
compression:
enabled: true
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 10240
#zuul网关路由设置
zuul:
routes:
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/resources/application.yml.hbs
浏览文件 @
847b35aa
spring:
profiles:
include:
sys ,
nacos,
{{
lowerCase
app
.
codeName
}}
-prod
include: nacos,
{{
lowerCase
app
.
codeName
}}
-prod
application:
name:
{{
projectName
}}
-
{{
lowerCase
app
.
codeName
}}
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/resources/logback-spring.xml.hbs
浏览文件 @
847b35aa
...
...
@@ -8,7 +8,7 @@
<conversionRule
conversionWord=
"wex"
converterClass=
"org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"
/>
<conversionRule
conversionWord=
"wEx"
converterClass=
"org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"
/>
<!-- 彩色日志格式 -->
<property
name=
"LOG_PATTERN2"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}
}
"
/>
<property
name=
"LOG_PATTERN2"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<!-- 控制台输出 -->
<appender
name=
"Console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
...
...
@@ -26,18 +26,19 @@
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_PATH}}/
{{
projectName
}}
-
{{
lowerCase
app
.
codeName
}}
.%d{yyyy-MM-dd}.log
</FileNamePattern>
<FileNamePattern>
${LOG_PATH}/
{{
projectName
}}
-
{{
lowerCase
app
.
codeName
}}
.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--日志文件最大的大小-->
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
${LOG_PATTERN}
}
</pattern>
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
100MB
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-boot/pom.xml.hbs
浏览文件 @
847b35aa
...
...
@@ -14,11 +14,6 @@
<description>
{{
projectDesc
}}
Boot
</description>
<dependencies>
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
{{#
each
system
.
apis
}}
<dependency>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-boot/src/main/java/{{packageName}}/DevBootApplication.java.hbs
浏览文件 @
847b35aa
...
...
@@ -21,16 +21,16 @@ import org.springframework.beans.factory.annotation.Autowired;
@EnableDiscoveryClient
@Configuration
@EnableTransactionManagement
@EnableFeignClients(basePackages = {"
{{
packageName
}}
"
})
@EnableFeignClients(basePackages = {"
{{
packageName
}}
"
,"cn.ibizlab.util"
})
@SpringBootApplication(exclude = {
{{#
unless
system
.
enableMongo
}}
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
{{/
unless
}}
{{#
if
system
.
enableDS
}}
{{#
unless
system
.
enableDS
}}
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure.class
{{/
if
}}
{{/
unless
}}
})
@ComponentScan(basePackages = {"
{{
packageName
}}
"}
@ComponentScan(basePackages = {"
{{
packageName
}}
"
,"cn.ibizlab.util"
}
// ,excludeFilters = {
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX, pattern="
{{
packageName
}}
.xxx.rest.xxx"),
// }
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-boot/src/main/resources/logback-spring.xml.hbs
浏览文件 @
847b35aa
...
...
@@ -8,7 +8,7 @@
<conversionRule
conversionWord=
"wex"
converterClass=
"org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"
/>
<conversionRule
conversionWord=
"wEx"
converterClass=
"org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"
/>
<!-- 彩色日志格式 -->
<property
name=
"LOG_PATTERN2"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}
}
"
/>
<property
name=
"LOG_PATTERN2"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<!-- 控制台输出 -->
<appender
name=
"Console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
...
...
@@ -27,18 +27,19 @@
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_PATH}}/
{{
projectName
}}
.%d{yyyy-MM-dd}.log
</FileNamePattern>
<FileNamePattern>
${LOG_PATH}/
{{
projectName
}}
.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--日志文件最大的大小-->
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
${LOG_PATTERN}
}
</pattern>
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
100MB
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/pom.xml.hbs
浏览文件 @
847b35aa
...
...
@@ -14,42 +14,86 @@
<description>
{{
projectDesc
}}
Core
</description>
<dependencies>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-commons
</artifactId>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-util
</artifactId>
<version>
${ibizlab-util.version}
</version>
</dependency>
<!-- JBPM -->
{{#
system
.
enableES
}}
<dependency>
<groupId>
org.
jbpm
</groupId>
<artifactId>
jbpm-flow-builder
</artifactId>
<groupId>
org.
springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-elasticsearch
</artifactId>
</dependency>
{{/
system
.
enableES
}}
{{#
system
.
enableMQ
}}
<dependency>
<groupId>
org.jbpm
</groupId>
<artifactId>
jbpm-bpmn2
</artifactId>
<groupId>
org.apache.rocketmq
</groupId>
<artifactId>
rocketmq-client
</artifactId>
<version>
${rocketmq.version}
</version>
</dependency>
<!-- Drools -->
{{/
system
.
enableMQ
}}
{{#
system
.
enableOAuth2
}}
<dependency>
<groupId>
org.drools
</groupId>
<artifactId>
drools-compiler
</artifactId>
<groupId>
org.springframework.security.oauth
</groupId>
<artifactId>
spring-security-oauth2
</artifactId>
<version>
2.3.6.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.drools
</groupId>
<artifactId>
drools-core
</artifactId>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-jwt
</artifactId>
<version>
1.0.10.RELEASE
</version>
</dependency>
{{/
system
.
enableOAuth2
}}
{{#
system
.
enableOracle
}}
<!-- Oracle驱动包 -->
<dependency>
<groupId>
org.kie
</groupId>
<artifactId>
kie-spring
</artifactId>
<groupId>
com.oracle.database.jdbc
</groupId>
<artifactId>
ojdbc8
</artifactId>
</dependency>
<dependency>
<groupId>
org.kie
</groupId>
<artifactId>
kie-api
</artifactId>
<groupId>
com.oracle.database.nls
</groupId>
<artifactId>
orai18n
</artifactId>
</dependency>
{{/
system
.
enableOracle
}}
{{#
system
.
enablePostgreSQL
}}
<!-- PostgreSQL驱动包 -->
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
</dependency>
{{/
system
.
enablePostgreSQL
}}
{{#
system
.
enableMysql
}}
<!-- MySQL驱动包 -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
{{/
system
.
enableMysql
}}
<!-- JBPM -->
<dependency>
<groupId>
org.jbpm
</groupId>
<artifactId>
jbpm-flow-builder
</artifactId>
</dependency>
<dependency>
<groupId>
org.jbpm
</groupId>
<artifactId>
jbpm-bpmn2
</artifactId>
</dependency>
<!-- MySQL数据库 -->
<dependency>
...
...
@@ -73,11 +117,7 @@
<artifactId>
mapstruct-processor
</artifactId>
</dependency>
<!--MongoDB-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
</dependency>
<!--Liquibase数据库版本更新工具-->
<dependency>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/impl/{{entities@SQL}}ServiceImpl.java.hbs
浏览文件 @
847b35aa
...
...
@@ -48,10 +48,12 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
* 实体[
{{
entity
.
logicName
}}
] 服务对象接口实现
*/
@Slf4j
@Service("
{{
entity
.
codeName
}}
Service
Impl
")
@Service("
{{
entity
.
codeName
}}
Service")
public class
{{
entity
.
codeName
}}
ServiceImpl extends ServiceImpl
<
{{
entity
.
codeName
}}
Mapper
,
{{
entity
.
codeName
}}
>
implements I
{{
entity
.
codeName
}}
Service {
protected I
{{
entity
.
codeName
}}
Service
{{
camelCase
entity
.
codeName
}}
Service = SpringContextHolder.getBean(this.getClass());
protected I
{{
entity
.
codeName
}}
Service getProxyService() {
return SpringContextHolder.getBean(this.getClass());
}
{{#
entity
.
relEntities
}}
{{#
neq
storage
"NONE"
}}
...
...
@@ -146,9 +148,9 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
{{#if
(
or
entity
.
actions
.
create
.
psDEActionLogics
entity
.
isIndexSubDE
)
}}
for (
{{
entity
.
codeName
}}
et : list) {
{{#if
entity
.
unionKeyMode
}}
{{
camelCase
entity
.
codeName
}}
Service
.save(et);
getProxyService()
.save(et);
{{else}}
{{
camelCase
entity
.
codeName
}}
Service
.create(et);
getProxyService()
.create(et);
{{/if}}
}
{{else}}
...
...
@@ -205,7 +207,7 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
public boolean updateBatch(List
<
{{
entity
.
codeName
}}
>
list) {
{{#if
(
or
entity
.
actions
.
update
.
psDEActionLogics
entity
.
isIndexSubDE
(
not
entity
.
keyField
.
phisicalDEField
))
}}
for (
{{
entity
.
codeName
}}
et : list) {
{{
camelCase
entity
.
codeName
}}
Service
.update(et);
getProxyService()
.update(et);
}
{{else}}
{{#
entity
.
hasReferences
}}
...
...
@@ -222,9 +224,9 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
{{#
eq
entity
.
actions
.
save
.
transactionMode
"GLOBAL"
}}
@GlobalTransactional
{{/
eq
}}{{#
eq
entity
.
actions
.
save
.
transactionMode
"DEFAULT"
}}
@Transactional
{{/
eq
}}
public boolean save(
{{
entity
.
codeName
}}
et) {
if(checkKey(et))
return
{{
camelCase
entity
.
codeName
}}
Service
.update(et);
return
getProxyService()
.update(et);
else
return
{{
camelCase
entity
.
codeName
}}
Service
.create(et);
return
getProxyService()
.create(et);
}
{{#
eq
entity
.
actions
.
save
.
transactionMode
"GLOBAL"
}}
@GlobalTransactional
{{/
eq
}}{{#
eq
entity
.
actions
.
save
.
transactionMode
"DEFAULT"
}}
@Transactional
{{/
eq
}}
...
...
@@ -246,9 +248,9 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
_create.add(et);
});
List rtList=new ArrayList
<>
();
if(_update.size()>0
&&
(!
{{
camelCase
entity
.
codeName
}}
Service
.updateBatch(_update)))
if(_update.size()>0
&&
(!
getProxyService()
.updateBatch(_update)))
return false;
if(_create.size()>0
&&
(!
{{
camelCase
entity
.
codeName
}}
Service
.createBatch(_create)))
if(_create.size()>0
&&
(!
getProxyService()
.createBatch(_create)))
return false;
return true;
}
...
...
@@ -297,7 +299,7 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
public boolean removeBatch(Collection
<
{{
entity
.
keyField
.
type
.
java
}}
>
ids) {
{{#if
(
or
entity
.
actions
.
update
.
psDEActionLogics
entity
.
isIndexSubDE
(
not
entity
.
keyField
.
phisicalDEField
)
entity
.
hasPSDERsMapping
)
}}
for (
{{
entity
.
keyField
.
type
.
java
}}
et : ids)
{{
camelCase
entity
.
codeName
}}
Service
.remove(et);
getProxyService()
.remove(et);
{{else}}
if(!removeByIds(ids))
return false;
...
...
@@ -359,11 +361,11 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
else
_create.add(sub);
}
if(_update.size()>0
&&
(!
{{
camelCase
entity
.
codeName
}}
Service
.updateBatch(_update)))
if(_update.size()>0
&&
(!
getProxyService()
.updateBatch(_update)))
return false;
if(_create.size()>0
&&
(!
{{
camelCase
entity
.
codeName
}}
Service
.createBatch(_create)))
if(_create.size()>0
&&
(!
getProxyService()
.createBatch(_create)))
return false;
if(delIds.size()>0
&&
(!
{{
camelCase
entity
.
codeName
}}
Service
.removeBatch(delIds)))
if(delIds.size()>0
&&
(!
getProxyService()
.removeBatch(delIds)))
return false;
return true;
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/resources/application-sys.yml.hbs
浏览文件 @
847b35aa
...
...
@@ -186,6 +186,7 @@ ribbon:
#系统是否开启权限验证、是否开启缓存
#缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz:
systemid:
{{
system
.
codeName
}}
enablePermissionValid: true
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
{{#
eq
system
.
saaSMode
4
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-dependencies/pom.xml.hbs
浏览文件 @
847b35aa
...
...
@@ -19,10 +19,40 @@
</parent>
<properties>
<maven-jar-plugin
.
version
>
3.1.1
</maven-jar-plugin
.version
>
<!-- Security -->
<spring-cloud-security
.
version
>
2.1.1.RELEASE
</spring-cloud-security
.version
>
<!-- openfeign -->
<spring-cloud-openfeign
.
version
>
2.2.1.RELEASE
</spring-cloud-openfeign
.version
>
<!-- Zuul网关 -->
<spring-cloud-starter-netflix-zuul
.
version
>
2.2.1.RELEASE
</spring-cloud-starter-netflix-zuul
.version
>
<!-- Spring Cloud Alibaba(2.2.x.RELEASE) & Spring Cloud(Spring Cloud Greenwich) & Spring Boot(2.2.x.RELEASE) compatibility -->
<spring-cloud-alibaba
.
version
>
2.2.1.RELEASE
</spring-cloud-alibaba
.version
>
<spring-cloud-openfeign
.
version
>
2.2.1.RELEASE
</spring-cloud-openfeign
.version
>
<!-- eureka微服务注册中心 -->
<eureka-client
.
version
>
2.2.1.RELEASE
</eureka-client
.version
>
<!--Java Web Token-->
<jsonwebtoken-jjwt
.
version
>
0.9.1
</jsonwebtoken-jjwt
.version
>
<!--caffeine缓存-->
<caffeine-cache
.
version
>
2.6.0
</caffeine-cache
.version
>
<!--反序列化工具-->
<kryo
.
version
>
4.0.2
</kryo
.version
>
<!-- Error -->
<zalando-problem-spring-web
.
version
>
0.23.0
</zalando-problem-spring-web
.version
>
<!--httpClient -->
<openfeign-httpclient
.
version
>
11.0
</openfeign-httpclient
.version
>
<!--log4j2 -->
<log4j2
.
version
>
2.16.0
</log4j2
.version
>
<!-- Alibaba Druid -->
<alibaba-druid
.
version
>
1.1.21
</alibaba-druid
.version
>
...
...
@@ -37,70 +67,64 @@
<!-- JBPM+Drools -->
<drools-version>
7.23.0.Final
</drools-version>
<!-- Error -->
<zalando-problem-spring-web
.
version
>
0.23.0
</zalando-problem-spring-web
.version
>
<!-- Security -->
<spring-cloud-security
.
version
>
2.1.1.RELEASE
</spring-cloud-security
.version
>
<maven-jar-plugin
.
version
>
3.1.1
</maven-jar-plugin
.version
>
<!--logstash-logback-encoder-->
<logstash
.
version
>
5.2
</logstash
.version
>
<!--Zuul网关-->
<spring-cloud-starter-netflix-zuul
.
version
>
2.2.1.RELEASE
</spring-cloud-starter-netflix-zuul
.version
>
<!--MapStruct高性能属性映射工具-->
<mapstruct
.
version
>
1.3.0.Final
</mapstruct
.version
>
<!--Java Web Token-->
<jsonwebtoken-jjwt
.
version
>
0.9.1
</jsonwebtoken-jjwt
.version
>
<!--Liquibase数据库版本更新工具-->
<liquibase
.
version
>
3.9.0
</liquibase
.version
>
<!--H2内存数据库-->
<h2
.
version
>
1.4.200
</h2
.version
>
<!--caffeine缓存-->
<caffeine-cache
.
version
>
2.6.0
</caffeine-cache
.version
>
<!--反序列化工具-->
<kryo
.
version
>
4.0.2
</kryo
.version
>
<!--httpClient -->
<openfeign-httpclient
.
version
>
11.0
</openfeign-httpclient
.version
>
<!--baomidou-jobs定时服务 -->
<baomidou-jobs
.
version
>
1.0.3
</baomidou-jobs
.version
>
<!-- eureka微服务注册中心 -->
<eureka-client
.
version
>
2.2.1.RELEASE
</eureka-client
.version
>
<!-- 阿里sentinel熔断器 -->
<alibaba-sentinel
.
version
>
2.1.1.RELEASE
</alibaba-sentinel
.version
>
<!-- 阿里seata分布式事务 -->
<alibaba-seata
.
version
>
1.3.0
</alibaba-seata
.version
>
<log4j2
.
version
>
2.16.0
</log4j2
.version
>
{{#
system
.
enableOracle
}}
<oracle
.
version
>
19.8.0.0
</oracle
.version
>
{{/
system
.
enableOracle
}}
{{#
system
.
enablePostgreSQL
}}
<postgresql
.
version
>
42.2.6
</postgresql
.version
>
{{/
system
.
enablePostgreSQL
}}
{{#
system
.
enableMQ
}}
<mysql
.
version
>
8.0.18
</mysql
.version
>
<rocketmq
.
version
>
4.7.0
</rocketmq
.version
>
{{/
system
.
enableMQ
}}
<flowable-modeler
.
version
>
6.4.2
</flowable-modeler
.version
>
<ibizlab-common
.
version
>
1.0.1
</ibizlab-common
.version
>
<ibizlab-util
.
version
>
1.0.1
</ibizlab-util
.version
>
</properties>
<dependencyManagement>
<dependencies>
<!-- Alibaba Cloud -->
<!-- Spring Cloud -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-security
</artifactId>
<version>
${spring-cloud-security.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-openfeign-dependencies
</artifactId>
<version>
${spring-cloud-openfeign.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-zuul
</artifactId>
<version>
${spring-cloud-starter-netflix-zuul.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-alibaba-dependencies
</artifactId>
...
...
@@ -109,13 +133,53 @@
<scope>
import
</scope>
</dependency>
<!-- Spring Cloud -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-sentinel
</artifactId>
<version>
${alibaba-sentinel.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-openfeign-dependencies
</artifactId>
<version>
${spring-cloud-openfeign.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
<version>
${eureka-client.version}
</version>
</dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<artifactId>
jjwt
</artifactId>
<version>
${jsonwebtoken-jjwt.version}
</version>
</dependency>
<dependency>
<groupId>
com.github.ben-manes.caffeine
</groupId>
<artifactId>
caffeine
</artifactId>
<version>
${caffeine-cache.version}
</version>
</dependency>
<dependency>
<groupId>
com.esotericsoftware
</groupId>
<artifactId>
kryo-shaded
</artifactId>
<version>
${kryo.version}
</version>
</dependency>
<dependency>
<groupId>
org.zalando
</groupId>
<artifactId>
problem-spring-web
</artifactId>
<version>
${zalando-problem-spring-web.version}
</version>
</dependency>
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-httpclient
</artifactId>
<version>
${openfeign-httpclient.version}
</version>
</dependency>
<dependency>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-common
</artifactId>
<version>
${ibizlab-common.version}
</version>
</dependency>
<!-- Alibaba Druid -->
...
...
@@ -136,6 +200,7 @@
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
${mybatis-plus.version}
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
...
...
@@ -202,20 +267,6 @@
<version>
${drools-version}
</version>
</dependency>
<!-- Error -->
<!-- Security -->
<dependency>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
<version>
${logstash.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-zuul
</artifactId>
<version>
${spring-cloud-starter-netflix-zuul.version}
</version>
</dependency>
<dependency>
<groupId>
org.mapstruct
</groupId>
...
...
@@ -228,43 +279,6 @@
<version>
${mapstruct.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-security
</artifactId>
<version>
${spring-cloud-security.version}
</version>
</dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<artifactId>
jjwt
</artifactId>
<version>
${jsonwebtoken-jjwt.version}
</version>
</dependency>
<dependency>
<groupId>
org.zalando
</groupId>
<artifactId>
problem-spring-web
</artifactId>
<version>
${zalando-problem-spring-web.version}
</version>
</dependency>
<dependency>
<groupId>
com.github.ben-manes.caffeine
</groupId>
<artifactId>
caffeine
</artifactId>
<version>
${caffeine-cache.version}
</version>
</dependency>
<dependency>
<groupId>
com.esotericsoftware
</groupId>
<artifactId>
kryo-shaded
</artifactId>
<version>
${kryo.version}
</version>
</dependency>
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-httpclient
</artifactId>
<version>
${openfeign-httpclient.version}
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
jobs-spring-boot-starter
</artifactId>
...
...
@@ -282,165 +296,67 @@
<artifactId>
flowable-ui-modeler-conf
</artifactId>
<version>
${flowable-modeler.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Spring Boot -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<!-- Spring Cloud -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<!-- Alibaba Nacos -->
<!-- Oracle驱动包 -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-discovery
</artifactId>
<groupId>
com.oracle.database.jdbc
</groupId>
<artifactId>
ojdbc8
</artifactId>
<version>
${oracle.version}
</version>
</dependency>
<!-- Alibaba Sentinel -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-sentinel
</artifactId>
<version>
${alibaba-sentinel
.version}
</version>
<groupId>
com.oracle.database.nls
</groupId>
<artifactId>
orai18n
</artifactId>
<version>
${oracle
.version}
</version>
</dependency>
<!-- Lombok -->
<!-- PostgreSQL驱动包 -->
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<version>
${postgresql.version}
</version>
</dependency>
<!-- Httpclient -->
<!-- MySQL驱动包 -->
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
${mysql.version}
</version>
</dependency>
<!-- 阿里Druid数据源 -->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
</dependency>
<!-- H2内存库 -->
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
</dependency>
<!-- eureka服务注册中心 -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
<version>
${eureka-client
.version}
</version>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-common
</artifactId>
<version>
${ibizlab-common
.version}
</version>
</dependency>
{{#
system
.
enableDS
}}
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-util
</artifactId>
<version>
${ibizlab-util.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
{{/
system
.
enableDS
}}
{{#
system
.
enableES
}}
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-elasticsearch
</artifactId>
</dependency>
{{/
system
.
enableES
}}
{{#
system
.
enableMQ
}}
<dependency>
<groupId>
org.apache.rocketmq
</groupId>
<artifactId>
rocketmq-client
</artifactId>
<version>
${rocketmq.version}
</version>
</dependency>
<dependencies>
{{/
system
.
enableMQ
}}
{{#
system
.
enableGlobalTransaction
}}
<dependency>
<groupId>
io.seata
</groupId>
<artifactId>
seata-spring-boot-starter
</artifactId>
<version>
${r'${alibaba-seata.version}'}
</version>
<exclusions>
<exclusion>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Alibaba Sentinel -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-seata
</artifactId>
<version>
${r'${spring-cloud-alibaba.version}'}
</version>
<exclusions>
<exclusion>
<groupId>
io.seata
</groupId>
<artifactId>
seata-spring-boot-starter
</artifactId>
</exclusion>
</exclusions>
</dependency>
{{/
system
.
enableGlobalTransaction
}}
{{#
system
.
enableOAuth2
}}
<dependency>
<groupId>
org.springframework.security.oauth
</groupId>
<artifactId>
spring-security-oauth2
</artifactId>
<version>
2.3.6.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-jwt
</artifactId>
<version>
1.0.10.RELEASE
</version>
</dependency>
{{/
system
.
enableOAuth2
}}
{{#
system
.
enableOracle
}}
<!-- Oracle驱动包 -->
<dependency>
<groupId>
com.oracle.database.jdbc
</groupId>
<artifactId>
ojdbc8
</artifactId>
<version>
${oracle.version}
</version>
</dependency>
<dependency>
<groupId>
com.oracle.database.nls
</groupId>
<artifactId>
orai18n
</artifactId>
<version>
${oracle.version}
</version>
</dependency>
{{/
system
.
enableOracle
}}
{{#
system
.
enablePostgreSQL
}}
<!-- PostgreSQL驱动包 -->
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<version>
${postgresql.version}
</version>
<artifactId>
spring-cloud-starter-alibaba-sentinel
</artifactId>
<version>
${alibaba-sentinel.version}
</version>
</dependency>
{{/
system
.
enablePostgreSQL
}}
{{#
system
.
enableMysql
}}
<!-- MySQL驱动包 -->
<!-- Lombok -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
</dependency>
{{/
system
.
enableMysql
}}
<dependency>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-util
</artifactId>
<version>
0.0.2
</version>
<artifactId>
ibizlab-common
</artifactId>
</dependency>
</dependencies>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/{{system.codeName}}{{api.codeName}}Application.java.hbs
浏览文件 @
847b35aa
...
...
@@ -23,7 +23,7 @@ import java.util.List;
@EnableDiscoveryClient
@Configuration
@EnableTransactionManagement
@ComponentScan(basePackages = {"
{{
packageName
}}
"}
@ComponentScan(basePackages = {"
{{
packageName
}}
"
,"cn.ibizlab.util"}
}
// ,excludeFilters={
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX,pattern="
{{
packageName
}}
.${item.codeName?lower_case}.rest.xxx"),
// }
...
...
@@ -35,14 +35,14 @@ import java.util.List;
{{#
unless
system
.
enableMongo
}}
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
{{/
unless
}}
{{#
if
system
.
enableDS
}}
{{#
unless
system
.
enableDS
}}
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure.class
{{/
if
}}
{{/
unless
}}
})
@Import({
org.springframework.cloud.openfeign.FeignClientsConfiguration.class
})
@EnableFeignClients(basePackages = {"
{{
packageName
}}
" })
@EnableFeignClients(basePackages = {"
{{
packageName
}}
"
,"cn.ibizlab.util"
})
@EnableAsync
@EnableScheduling
public class
{{
system
.
codeName
}}{{
api
.
codeName
}}
Application extends WebMvcConfigurerAdapter{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/resources/application-{{apis}}-prod.yml.hbs
0 → 100644
浏览文件 @
847b35aa
server:
port:
{{#if
api
.
httpPort
}}{{
api
.
httpPort
}}{{else}}
8081
{{/if}}
#Log配置
logging:
level:
{{
packageName
}}
: info
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/resources/application.yml.hbs
0 → 100644
浏览文件 @
847b35aa
spring:
profiles:
include: sys ,nacos,
{{
lowerCase
api
.
codeName
}}
-prod
application:
name:
{{
projectName
}}
-
{{
lowerCase
api
.
codeName
}}
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/resources/logback-spring.xml.hbs
0 → 100644
浏览文件 @
847b35aa
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<property
name=
"LOG_PATH"
value=
"logs"
/>
<property
name=
"LOG_PATTERN"
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] %-40.40logger{39} : %msg%n"
/>
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule
conversionWord=
"clr"
converterClass=
"org.springframework.boot.logging.logback.ColorConverter"
/>
<conversionRule
conversionWord=
"wex"
converterClass=
"org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"
/>
<conversionRule
conversionWord=
"wEx"
converterClass=
"org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"
/>
<!-- 彩色日志格式 -->
<property
name=
"LOG_PATTERN2"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<!-- 控制台输出 -->
<appender
name=
"Console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
${LOG_PATTERN}}
</pattern>
</encoder>
</appender>
<!--<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">-->
<!-- <destination>127.0.0.1:9601</destination>-->
<!-- <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">-->
<!-- <customFields>{"appname":"
{{
projectName
}}
-
{{
lowerCase
app
.
codeName
}}
"}</customFields>-->
<!-- </encoder>-->
<!--</appender>-->
<!-- 按照每天生成日志文件 -->
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_PATH}/
{{
projectName
}}
-
{{
lowerCase
api
.
codeName
}}
.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--日志文件最大的大小-->
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
</appender>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"Console"
/>
<appender-ref
ref=
"file"
/>
<!--<appender-ref ref="LOGSTASH" />-->
</root>
</configuration>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录