Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
9f7664e0
提交
9f7664e0
编写于
1月 04, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
路径作用域
上级
30268918
变更
35
隐藏空白字符变更
内嵌
并排
正在显示
35 个修改的文件
包含
81 行增加
和
81 行删除
+81
-81
vue.config.js.hbs
...rc/main/resources/templ/r7/app_{{apps}}/vue.config.js.hbs
+1
-1
pom.xml.hbs
...c/main/resources/templ/r7/{{projectName}}-app/pom.xml.hbs
+1
-1
pom.xml.hbs
...rojectName}}-app/{{projectName}}-app-{{apps}}/pom.xml.hbs
+13
-13
Dockerfile.hbs
...projectName}}-app-{{apps}}/src/main/docker/Dockerfile.hbs
+2
-2
NacosRegisterConfig.java.hbs
...ackageName}}/{{apps}}/config/NacosRegisterConfig.java.hbs
+1
-1
{{app.codeName}}HeaderFilter.java.hbs
...e}}/{{apps}}/config/{{app.codeName}}HeaderFilter.java.hbs
+1
-1
{{app.codeName}}SecurityConfig.java.hbs
...}/{{apps}}/config/{{app.codeName}}SecurityConfig.java.hbs
+2
-2
{{app.codeName}}Application.java.hbs
...ckageName}}/{{apps}}/{{app.codeName}}Application.java.hbs
+2
-2
{{app.codeName}}Initializer.java.hbs
...ckageName}}/{{apps}}/{{app.codeName}}Initializer.java.hbs
+1
-1
application-{{apps}}-prod.yml.hbs
...ps}}/src/main/resources/application-{{apps}}-prod.yml.hbs
+1
-1
application.yml.hbs
...ame}}-app-{{apps}}/src/main/resources/application.yml.hbs
+2
-2
logback-spring.xml.hbs
...}}-app-{{apps}}/src/main/resources/logback-spring.xml.hbs
+2
-2
pom.xml.hbs
.../main/resources/templ/r7/{{projectName}}-boot/pom.xml.hbs
+2
-2
application-dev.yml.hbs
...ectName}}-boot/src/main/resources/application-dev.yml.hbs
+8
-8
application.yml.hbs
...projectName}}-boot/src/main/resources/application.yml.hbs
+1
-1
{{entities@NONE}}.java.hbs
...Name}}/core/{{modules}}/domain/{{entities@NONE}}.java.hbs
+1
-1
{{entities@SQL}}.java.hbs
...eName}}/core/{{modules}}/domain/{{entities@SQL}}.java.hbs
+1
-1
{{entities@SQL}}SearchContext.java.hbs
...{{modules}}/filter/{{entities@SQL}}SearchContext.java.hbs
+2
-2
{{entities@SQL}}Mapper.java.hbs
...}/core/{{modules}}/mapper/{{entities@SQL}}Mapper.java.hbs
+3
-3
I{{entities@SQL}}Service.java.hbs
...ore/{{modules}}/service/I{{entities@SQL}}Service.java.hbs
+3
-3
{{entities@SQL}}ServiceImpl.java.hbs
...dules}}/service/impl/{{entities@SQL}}ServiceImpl.java.hbs
+1
-1
{{entities@SQL}}Mapper.xml.hbs
...r/{{modules}}/{{entities}}/{{entities@SQL}}Mapper.xml.hbs
+4
-4
pom.xml.hbs
...n/resources/templ/r7/{{projectName}}-provider/pom.xml.hbs
+1
-1
pom.xml.hbs
...}}-provider/{{projectName}}-provider-{{apis}}/pom.xml.hbs
+6
-6
Dockerfile.hbs
...ctName}}-provider-{{apis}}/src/main/docker/Dockerfile.hbs
+2
-2
SwaggerConfiguration.java.hbs
...ava/{{packageName}}/swagger/SwaggerConfiguration.java.hbs
+1
-1
{{api.codeName}}AutoConfiguration.java.hbs
...{apis}}/config/{{api.codeName}}AutoConfiguration.java.hbs
+1
-1
{{api.codeName}}RestConfiguration.java.hbs
...{apis}}/config/{{api.codeName}}RestConfiguration.java.hbs
+2
-2
{{api.codeName}}SecurityConfig.java.hbs
...}/{{apis}}/config/{{api.codeName}}SecurityConfig.java.hbs
+2
-2
{{api.codeName}}ServiceProperties.java.hbs
...{apis}}/config/{{api.codeName}}ServiceProperties.java.hbs
+2
-2
{{apiEntities}}DTO.java.hbs
.../{{packageName}}/{{apis}}/dto/{{apiEntities}}DTO.java.hbs
+1
-1
{{apiEntities}}Mapping.java.hbs
...geName}}/{{apis}}/mapping/{{apiEntities}}Mapping.java.hbs
+2
-2
{{apiEntities}}Resource.java.hbs
...kageName}}/{{apis}}/rest/{{apiEntities}}Resource.java.hbs
+4
-4
{{system.codeName}}{{api.codeName}}Application.java.hbs
...}/{{system.codeName}}{{api.codeName}}Application.java.hbs
+1
-1
{{system.codeName}}{{api.codeName}}Initializer.java.hbs
...}/{{system.codeName}}{{api.codeName}}Initializer.java.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/vue.config.js.hbs
浏览文件 @
9f7664e0
...
...
@@ -8,7 +8,7 @@ module.exports = {
publicPath: './',
// 去除 map 文件 1
productionSourceMap: false,
outputDir:"../
{{
projectName
}}
-app/
{{
projectName
}}
-app-
{{
apps
}}
/target/classes/META-INF/resources",
outputDir:"../
{{
projectName
}}
-app/
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
/target/classes/META-INF/resources",
devServer: {
host: '0.0.0.0',
port: 8111,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/pom.xml.hbs
浏览文件 @
9f7664e0
...
...
@@ -16,7 +16,7 @@
<modules>
{{#
apps
}}
<module>
{{
projectName
}}
-app-
{{
apps
}}
</module>
<module>
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
</module>
{{/
apps
}}
</modules>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/pom.xml.hbs
浏览文件 @
9f7664e0
...
...
@@ -9,9 +9,9 @@
<version>
1.0.0.0
</version>
</parent>
<artifactId>
{{
projectName
}}
-app-
{{
apps
}}
</artifactId>
<name>
{{
projectDesc
}}
Gateway
{{
apps
}}
</name>
<description>
{{
projectDesc
}}
{{
apps
}}
</description>
<artifactId>
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
</artifactId>
<name>
{{
projectDesc
}}
Gateway
{{
lowerCase
app
.
codeName
}}
</name>
<description>
{{
projectDesc
}}
{{
lowerCase
app
.
codeName
}}
</description>
<packaging>
${project.packaging}
</packaging>
<dependencies>
...
...
@@ -25,7 +25,7 @@
<profiles>
<profile>
<id>
{{
apps
}}
</id>
<id>
{{
lowerCase
app
.
codeName
}}
</id>
<build>
<resources>
<resource>
...
...
@@ -57,7 +57,7 @@
</goals>
<configuration>
<executable>
yarn
</executable>
<workingDirectory>
../../app_
{{
apps
}}
</workingDirectory>
<workingDirectory>
../../app_
{{
lowerCase
app
.
codeName
}}
</workingDirectory>
</configuration>
</execution>
<execution>
...
...
@@ -71,7 +71,7 @@
<arguments>
<argument>
build
</argument>
</arguments>
<workingDirectory>
../../app_
{{
apps
}}
</workingDirectory>
<workingDirectory>
../../app_
{{
lowerCase
app
.
codeName
}}
</workingDirectory>
</configuration>
</execution>
<execution>
...
...
@@ -107,9 +107,9 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<finalName>
{{
projectName
}}
-app-
{{
apps
}}
</finalName>
<finalName>
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
</finalName>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<mainClass>
{{
packageName
}}
.
{{
apps
}}
.
{{
apps
}}
Application
</mainClass>
<mainClass>
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
.
{{
app
.
codeName
}}
Application
</mainClass>
<outputDirectory>
../../
</outputDirectory>
</configuration>
<executions>
...
...
@@ -142,7 +142,7 @@
</build>
</profile>
<profile>
<id>
{{
apps
}}
-war
</id>
<id>
{{
lowerCase
app
.
codeName
}}
-war
</id>
<properties>
<project
.
packaging
>
war
</project
.packaging
>
</properties>
...
...
@@ -177,7 +177,7 @@
</goals>
<configuration>
<executable>
yarn
</executable>
<workingDirectory>
../../app_
{{
apps
}}
</workingDirectory>
<workingDirectory>
../../app_
{{
lowerCase
app
.
codeName
}}
</workingDirectory>
</configuration>
</execution>
<execution>
...
...
@@ -191,7 +191,7 @@
<arguments>
<argument>
build
</argument>
</arguments>
<workingDirectory>
../../app_
{{
apps
}}
</workingDirectory>
<workingDirectory>
../../app_
{{
lowerCase
app
.
codeName
}}
</workingDirectory>
</configuration>
</execution>
<execution>
...
...
@@ -226,9 +226,9 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<finalName>
{{
projectName
}}
-app-
{{
apps
}}
</finalName>
<finalName>
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
</finalName>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<mainClass>
{{
packageName
}}
.
{{
apps
}}
.
{{
apps
}}
Application
</mainClass>
<mainClass>
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
.
{{
app
.
codeName
}}
Application
</mainClass>
<outputDirectory>
../../
</outputDirectory>
</configuration>
<executions>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/docker/Dockerfile.hbs
浏览文件 @
9f7664e0
...
...
@@ -7,8 +7,8 @@ ENV TZ="Asia/Shanghai" \
CMD echo "The application will start in ${IBIZ_SLEEP}s..."
&&
\
sleep ${IBIZ_SLEEP}
&&
\
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /
{{
projectName
}}
-app-
{{
apps
}}
.jar
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
.jar
EXPOSE
{{#if
app
.
httpPort
}}{{
app
.
httpPort
}}{{else}}
8080
{{/if}}
ADD
{{
projectName
}}
-app-
{{
apps
}}
.jar /
{{
projectName
}}
-app-
{{
apps
}}
.jar
ADD
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
.jar /
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
.jar
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/java/{{packageName}}/{{apps}}/config/NacosRegisterConfig.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apps
}}
.config;
package
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
.config;
import com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration;
import cn.ibizlab.util.errors.BadRequestAlertException;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/java/{{packageName}}/{{apps}}/config/{{app.codeName}}HeaderFilter.java.hbs
浏览文件 @
9f7664e0
{{#
eq
system
.
saaSMode
4
}}
package
{{
packageName
}}
.
{{
apps
}}
.config;
package
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
.config;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/java/{{packageName}}/{{apps}}/config/{{app.codeName}}SecurityConfig.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apps
}}
.config;
package
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
.config;
import cn.ibizlab.util.security.AuthenticationEntryPoint;
import cn.ibizlab.util.security.AuthorizationTokenFilter;
...
...
@@ -22,7 +22,7 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
import org.springframework.context.annotation.Profile;
import org.springframework.beans.factory.annotation.Qualifier;
@Profile("
{{
apps
}}
-prod")
@Profile("
{{
lowerCase
app
.
codeName
}}
-prod")
@Configuration
@EnableWebSecurity
public class
{{
app
.
codeName
}}
SecurityConfig extends WebSecurityConfigurerAdapter {
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/java/{{packageName}}/{{apps}}/{{app.codeName}}Application.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apps
}}
;
package
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.SpringBootApplication;
...
...
@@ -25,7 +25,7 @@ import java.util.List;
@Configuration
@EnableFeignClients(basePackages = {"
{{
packageName
}}
" })
@EnableZuulProxy
@ComponentScan(basePackages = {"
{{
packageName
}}
.
{{
apps
}}
","cn.ibizlab.util"})
@ComponentScan(basePackages = {"
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
","cn.ibizlab.util"})
@MapperScan("
{{
packageName
}}
.*.mapper")
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/java/{{packageName}}/{{apps}}/{{app.codeName}}Initializer.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apps
}}
;
package
{{
packageName
}}
.
{{
lowerCase
app
.
codeName
}}
;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.builder.SpringApplicationBuilder;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/resources/application-{{apps}}-prod.yml.hbs
浏览文件 @
9f7664e0
...
...
@@ -71,7 +71,7 @@ zuul:
stripPrefix: false
{{#
each
app
.
appEntities
}}
{{#
serviceId
}}
{{
apps
}}
-
{{
lowerCase
codeName
}}
:
{{
lowerCase
app
.
codeName
}}
-
{{
lowerCase
codeName
}}
:
path: /
{{
pluralize
codeName
}}
/**
serviceId: ${ ibiz.ref.service.
{{
serviceId
}}
:
{{
serviceId
}}
}
stripPrefix: false
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-app/{{projectName}}-app-{{apps}}/src/main/resources/application.yml.hbs
浏览文件 @
9f7664e0
spring:
profiles:
include: sys ,nacos,
{{
apps
}}
-prod
include: sys ,nacos,
{{
lowerCase
app
.
codeName
}}
-prod
application:
name:
{{
projectName
}}
-
{{
apps
}}
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
浏览文件 @
9f7664e0
...
...
@@ -19,14 +19,14 @@
<!--<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
}}
-
{{
apps
}}
"}</customFields>-->
<!-- <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
}}
-
{{
apps
}}
.%d{yyyy-MM-dd}.log
</FileNamePattern>
<FileNamePattern>
${LOG_PATH}}/
{{
projectName
}}
-
{{
lowerCase
app
.
codeName
}}
.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-boot/pom.xml.hbs
浏览文件 @
9f7664e0
...
...
@@ -23,7 +23,7 @@
{{#
apis
}}
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-provider-
{{
apis
}}
</artifactId>
<artifactId>
{{
projectName
}}
-provider-
{{
lowerCase
api
.
codeName
}}
</artifactId>
<version>
${project.version}
</version>
</dependency>
{{/
apis
}}
...
...
@@ -31,7 +31,7 @@
{{#
apps
}}
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-app-
{{
apps
}}
</artifactId>
<artifactId>
{{
projectName
}}
-app-
{{
lowerCase
app
.
codeName
}}
</artifactId>
<version>
${project.version}
</version>
</dependency>
{{/
apps
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-boot/src/main/resources/application-dev.yml.hbs
浏览文件 @
9f7664e0
...
...
@@ -65,15 +65,15 @@ zuul:
path: /sysauthlogs
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}}
stripPrefix: false
{{#
each
system
.
apps
as
|
app
|
}}
{{#
each
app
.
appEntities
}}
{{#
eq
entity
.
storage
"ServiceAPI"
}}
{{#
serviceId
}}
{{
apps
}}
-
{{
lowerCase
codeName
}}
:
path: /
{{
pluralize
codeName
}}
/**
serviceId: ${ ibiz.ref.service.
{{
serviceId
}}
:
{{
serviceId
}}
}
{{#
each
apps
as
|
web
app
|
}}
{{#
each
webapp
.
appEntities
as
|
appEntity
|
}}
{{#
eq
appEntity
.
entity
.
storage
"ServiceAPI"
}}
{{#
appEntity
.
serviceId
}}
{{
lowerCase
webapp
.
codeName
}}
-
{{
lowerCase
appEntity
.
codeName
}}
:
path: /
{{
pluralize
appEntity
.
codeName
}}
/**
serviceId: ${ ibiz.ref.service.
{{
appEntity
.
serviceId
}}
:
{{
appEntity
.
serviceId
}}
}
stripPrefix: false
{{/
serviceId
}}
{{/
appEntity
.
serviceId
}}
{{/
eq
}}
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-boot/src/main/resources/application.yml.hbs
浏览文件 @
9f7664e0
spring:
profiles:
include: sys , nacos ,
{{#
each
apps
}}
{{
apps
}}
-dev ,
{{/
each
}}{{#
each
apis
}}
{{
apis
}}
-dev ,
{{/
each
}}
dev
include: sys , nacos ,
{{#
each
apps
}}
{{
lowerCase
app
.
codeName
}}
-dev ,
{{/
each
}}{{#
each
apis
}}
{{
lowerCase
api
.
codeName
}}
-dev ,
{{/
each
}}
dev
application:
name:
{{
projectName
}}
main:
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/domain/{{entities@NONE}}.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.core.
{{
module
}}
.domain;
package
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/domain/{{entities@SQL}}.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.core.
{{
module
}}
.domain;
package
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/filter/{{entities@SQL}}SearchContext.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.core.
{{
module
}}
.filter;
package
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
...
...
@@ -24,7 +24,7 @@ import org.elasticsearch.index.query.QueryBuilders;
{{/
entity
.
enableES
}}
import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
/**
* 关系型数据实体[
{{
entity
.
codeName
}}
] 查询条件对象
*/
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/mapper/{{entities@SQL}}Mapper.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.core.
{{
module
}}
.mapper;
package
{{
packageName
}}
.core.
{{
entity
.
module
}}
.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
...
...
@@ -9,8 +9,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map;
import org.apache.ibatis.annotations.Select;
import
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/I{{entities@SQL}}Service.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.core.
{{
module
}}
.service;
package
{{
packageName
}}
.core.
{{
entity
.
module
}}
.service;
import java.io.Serializable;
import java.sql.Timestamp;
...
...
@@ -18,8 +18,8 @@ import org.springframework.cache.annotation.CacheEvict;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.dynamic.datasource.annotation.DS;
import cn.ibizlab.util.helper.CachedBeanCopier;
import
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
{{#
dsName
}}
@DS("
{{
entity
.
dataSource
}}
")
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/impl/{{entities@SQL}}ServiceImpl.java.hbs
浏览文件 @
9f7664e0
...
...
@@ -64,7 +64,7 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
{{#if
entity
.
indexSubDE
}}
@Autowired
@Lazy
protected
{{
packageName
}}
.core.
{{
module
}}
.mapping.
{{
entity
.
codeName
}}
InheritMapping
{{
camelCase
codeName
}}
InheritMapping;
protected
{{
packageName
}}
.core.
{{
entity
.
module
}}
.mapping.
{{
entity
.
codeName
}}
InheritMapping
{{
camelCase
codeName
}}
InheritMapping;
{{/if}}
protected int batchSize = 500;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/resources/mapper/{{modules}}/{{entities}}/{{entities@SQL}}Mapper.xml.hbs
浏览文件 @
9f7664e0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"
{{
packageName
}}
.core.
{{
module
}}
.mapper.
{{
entity
.
codeName
}}
Mapper"
>
<mapper
namespace=
"
{{
packageName
}}
.core.
{{
entity
.
module
}}
.mapper.
{{
entity
.
codeName
}}
Mapper"
>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"
{{
entity
.
codeName
}}
ResultMap"
type=
"
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entity
.
codeName
}}
"
autoMapping=
"true"
>
<resultMap
id=
"
{{
entity
.
codeName
}}
ResultMap"
type=
"
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
"
autoMapping=
"true"
>
{{#
entity
.
keyField
.
phisicalDEField
}}
<id
property=
"
{{
camelCase
entity
.
keyField
.
codeName
}}
"
column=
"
{{
entity
.
keyField
.
columnName
}}
"
/>
<!--主键字段映射-->
{{/
entity
.
keyField
.
phisicalDEField
}}
...
...
@@ -54,7 +54,7 @@
t1.
{{
entity
.
keyField
.
columnName
}}
=#{id}
</select>
<select
id=
"selectEntity"
parameterType=
"
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entity
.
codeName
}}
"
resultMap=
"
{{
entity
.
codeName
}}
ResultMap"
>
<select
id=
"selectEntity"
parameterType=
"
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
"
resultMap=
"
{{
entity
.
codeName
}}
ResultMap"
>
{{#if
entity
.
viewDataQuery
}}
<include
refid=
"view"
/>
{{#if
entity
.
viewDataQuery
.
where
}}
...
...
@@ -110,7 +110,7 @@
{{/
each
}}
{{#
each
entity
.
dataSets
}}
<select
id=
"search
{{
pascalCase
codeName
}}
"
parameterType=
"
{{
packageName
}}
.core.
{{
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext"
resultType=
{{#if
enableGroup
}}
"java.util.HashMap"
{{else}}
"
{{
entity
.
codeName
}}
ResultMap
"
{{/if}}
>
<select
id=
"search
{{
pascalCase
codeName
}}
"
parameterType=
"
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext"
resultType=
{{#if
enableGroup
}}
"java.util.HashMap"
{{else}}
"
{{
entity
.
codeName
}}
ResultMap
"
{{/if}}
>
{{
select
}}
from (
{{#
each
queries
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/pom.xml.hbs
浏览文件 @
9f7664e0
...
...
@@ -16,7 +16,7 @@
<modules>
{{#
apis
}}
<module>
{{
projectName
}}
-provider-
{{
apis
}}
</module>
<module>
{{
projectName
}}
-provider-
{{
lowerCase
api
.
codeName
}}
</module>
{{/
apis
}}
</modules>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/pom.xml.hbs
浏览文件 @
9f7664e0
...
...
@@ -9,8 +9,8 @@
<version>
1.0.0.0
</version>
</parent>
<artifactId>
{{
projectName
}}
-provider-
{{
apis
}}
</artifactId>
<name>
{{
projectDesc
}}
Microservice
{{
apis
}}
</name>
<artifactId>
{{
projectName
}}
-provider-
{{
lowerCase
api
.
codeName
}}
</artifactId>
<name>
{{
projectDesc
}}
Microservice
{{
lowerCase
api
.
codeName
}}
</name>
<description>
microservice
</description>
<packaging>
${project.packaging}
</packaging>
...
...
@@ -31,7 +31,7 @@
<profiles>
<profile>
<id>
{{
apis
}}
</id>
<id>
{{
lowerCase
api
.
codeName
}}
</id>
<build>
<resources>
<resource>
...
...
@@ -49,7 +49,7 @@
<configuration>
<finalName>
{{
projectName
}}
-provider-api
</finalName>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<mainClass>
{{
packageName
}}
.api.
{{
projectName
}}{{
apis
}}
Application
</mainClass>
<mainClass>
{{
packageName
}}
.api.
{{
system
.
codeName
}}{{
api
.
codeName
}}
Application
</mainClass>
<outputDirectory>
../../
</outputDirectory>
</configuration>
<executions>
...
...
@@ -117,7 +117,7 @@
</profile>
<profile>
<id>
{{
apis
}}
-war
</id>
<id>
{{
lowerCase
api
.
codeName
}}
-war
</id>
<properties>
<project
.
packaging
>
war
</project
.packaging
>
</properties>
...
...
@@ -138,7 +138,7 @@
<configuration>
<finalName>
{{
projectName
}}
-provider-api
</finalName>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<mainClass>
{{
packageName
}}
.api.
{{
projectName
}}{{
apis
}}
Application
</mainClass>
<mainClass>
{{
packageName
}}
.api.
{{
system
.
codeName
}}{{
api
.
codeName
}}
Application
</mainClass>
<outputDirectory>
../../
</outputDirectory>
</configuration>
<executions>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/docker/Dockerfile.hbs
浏览文件 @
9f7664e0
...
...
@@ -7,8 +7,8 @@ ENV TZ="Asia/Shanghai" \
CMD echo "The application will start in ${IBIZ_SLEEP}s..."
&&
\
sleep ${IBIZ_SLEEP}
&&
\
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /
{{
projectName
}}
-provider-
{{
apis
}}
.jar
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /
{{
projectName
}}
-provider-
{{
lowerCase
api
.
codeName
}}
.jar
EXPOSE
{{#if
app
.
httpPort
}}{{
app
.
httpPort
}}{{else}}
8080
{{/if}}
ADD
{{
projectName
}}
-provider-
{{
apis
}}
.jar /
{{
projectName
}}
-provider-
{{
apis
}}
.jar
ADD
{{
projectName
}}
-provider-
{{
lowerCase
api
.
codeName
}}
.jar /
{{
projectName
}}
-provider-
{{
lowerCase
api
.
codeName
}}
.jar
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/swagger/SwaggerConfiguration.java.hbs
浏览文件 @
9f7664e0
...
...
@@ -48,7 +48,7 @@ public class SwaggerConfiguration {
}
@Bean
public Docket
{{
apis
}}
Docket() {
public Docket
{{
lowerCase
api
.
codeName
}}
Docket() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("
{{
api
.
name
}}
")
.pathMapping("/")
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/config/{{api.codeName}}AutoConfiguration.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apis
}}
.config;
package
{{
packageName
}}
.
{{
lowerCase
api
.
codeName
}}
.config;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/config/{{api.codeName}}RestConfiguration.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apis
}}
.config;
package
{{
packageName
}}
.
{{
lowerCase
api
.
codeName
}}
.config;
import org.springframework.context.annotation.ComponentScan;
@ComponentScan("
{{
packageName
}}
.
{{
apis
}}
")
@ComponentScan("
{{
packageName
}}
.
{{
lowerCase
api
.
codeName
}}
")
public class
{{
api
.
codeName
}}
RestConfiguration {
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/config/{{api.codeName}}SecurityConfig.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apis
}}
.config;
package
{{
packageName
}}
.
{{
lowerCase
api
.
codeName
}}
.config;
import cn.ibizlab.util.security.AuthenticationEntryPoint;
import cn.ibizlab.util.security.AuthorizationTokenFilter;
...
...
@@ -22,7 +22,7 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
import org.springframework.context.annotation.Profile;
import org.springframework.beans.factory.annotation.Qualifier;
@Profile("
{{
apis
}}
-prod")
@Profile("
{{
lowerCase
api
.
codeName
}}
-prod")
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/config/{{api.codeName}}ServiceProperties.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apis
}}
.config;
package
{{
packageName
}}
.
{{
lowerCase
api
.
codeName
}}
.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import lombok.Data;
@ConfigurationProperties(prefix = "service.
{{
apis
}}
")
@ConfigurationProperties(prefix = "service.
{{
lowerCase
api
.
codeName
}}
")
@Data
public class
{{
api
.
codeName
}}
ServiceProperties {
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/dto/{{apiEntities}}DTO.java.hbs
浏览文件 @
9f7664e0
{{#
unless
apiEntity
.
subSysDE
}}
package
{{
packageName
}}
.
{{
apis
}}
.dto;
package
{{
packageName
}}
.
{{
lowerCase
apiEntity
.
api
.
codeName
}}
.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/mapping/{{apiEntities}}Mapping.java.hbs
浏览文件 @
9f7664e0
{{#
unless
apiEntity
.
subSysDE
}}
package
{{
packageName
}}
.
{{
apis
}}
.mapping;
package
{{
packageName
}}
.
{{
lowerCase
apiEntity
.
api
.
codeName
}}
.mapping;
{{#
with
apiEntity
.
entity
as
|
entity
|
}}
import org.mapstruct.*;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.
{{
apis
}}
.dto.
{{
apiEntity
.
codeName
}}
DTO;
import
{{
packageName
}}
.
{{
lowerCase
apiEntity
.
api
.
codeName
}}
.dto.
{{
apiEntity
.
codeName
}}
DTO;
import cn.ibizlab.util.domain.MappingBase;
@Mapper(componentModel = "spring", uses = {}, implementationName = "
{{
api
.
codeName
}}{{
apiEntity
.
codeName
}}
Mapping",
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/rest/{{apiEntities}}Resource.java.hbs
浏览文件 @
9f7664e0
{{#if
apiEntity
.
major
}}
{{#
neq
apiEntity
.
entity
.
storage
"NONE"
}}
package
{{
packageName
}}
.
{{
apis
}}
.rest;
package
{{
packageName
}}
.
{{
lowerCase
apiEntity
.
api
.
codeName
}}
.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
...
...
@@ -29,8 +29,8 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import
{{
packageName
}}
.
{{
apis
}}
.dto.*;
import
{{
packageName
}}
.
{{
apis
}}
.mapping.*;
import
{{
packageName
}}
.
{{
lowerCase
apiEntity
.
api
.
codeName
}}
.dto.*;
import
{{
packageName
}}
.
{{
lowerCase
apiEntity
.
api
.
codeName
}}
.mapping.*;
import
{{
packageName
}}
.core.
{{
apiEntity
.
entity
.
module
}}
.domain.
{{
apiEntity
.
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
apiEntity
.
entity
.
module
}}
.service.I
{{
apiEntity
.
entity
.
codeName
}}
Service;
import
{{
packageName
}}
.core.
{{
apiEntity
.
entity
.
module
}}
.filter.
{{
apiEntity
.
entity
.
codeName
}}
SearchContext;
...
...
@@ -38,7 +38,7 @@ import cn.ibizlab.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"
{{
apiEntity
.
entity
.
logicName
}}
" })
@RestController("
{{
apis
}}
-
{{
lowerCase
apiEntity
.
codeName
}}
")
@RestController("
{{
lowerCase
apiEntity
.
api
.
codeName
}}
-
{{
lowerCase
apiEntity
.
codeName
}}
")
@RequestMapping("")
public class
{{
apiEntity
.
codeName
}}
Resource {
...
...
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
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apis
}}
;
package
{{
packageName
}}
.
{{
lowerCase
api
.
codeName
}}
;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-provider/{{projectName}}-provider-{{apis}}/src/main/java/{{packageName}}/{{apis}}/{{system.codeName}}{{api.codeName}}Initializer.java.hbs
浏览文件 @
9f7664e0
package
{{
packageName
}}
.
{{
apis
}}
;
package
{{
packageName
}}
.
{{
lowerCase
api
.
codeName
}}
;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.builder.SpringApplicationBuilder;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录