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,43 +14,87 @@
<description>
{{
projectDesc
}}
Core
</description>
<dependencies>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-commons
</artifactId>
</dependency>
<!-- JBPM -->
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-util
</artifactId>
<version>
${ibizlab-util.version}
</version>
</dependency>
{{#
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>
<groupId>
mysql
</groupId>
...
...
@@ -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
此差异已折叠。
点击以展开。
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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录