Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz4j Spring R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7后台标准模板
iBiz4j Spring R7
提交
7fe90329
提交
7fe90329
编写于
4月 29, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
INIT
上级
变更
119
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
119 个修改的文件
包含
2302 行增加
和
0 行删除
+2302
-0
.ibizproject
.ibizproject
+2
-0
README.md
README.md
+39
-0
pom.xml.ftl
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/pom.xml.ftl
+134
-0
%PUBPRJ%-app-%APP_PKGPATH%.yaml.ftl
...PATH%/src/main/docker/%PUBPRJ%-app-%APP_PKGPATH%.yaml.ftl
+28
-0
Dockerfile.ftl
...%PUBPRJ%-app-%APP_PKGPATH%/src/main/docker/Dockerfile.ftl
+25
-0
%APP%Application.java.ftl
...ava/%SYS_PKGPATH%/%APP_PKGPATH%/%APP%Application.java.ftl
+36
-0
%APP%SecurityConfig.java.ftl
...KGPATH%/%APP_PKGPATH%/config/%APP%SecurityConfig.java.ftl
+111
-0
application-%APP_PKGPATH%-dev.yml.ftl
.../src/main/resources/application-%APP_PKGPATH%-dev.yml.ftl
+14
-0
application-%APP_PKGPATH%-prod.yml.ftl
...src/main/resources/application-%APP_PKGPATH%-prod.yml.ftl
+42
-0
application.yml.ftl
...-app-%APP_PKGPATH%/src/main/resources/application.yml.ftl
+8
-0
pom.xml.ftl
SLN/%PUBPRJ%-app/pom.xml.ftl
+65
-0
pom.xml.ftl
SLN/%PUBPRJ%-boot/pom.xml.ftl
+85
-0
DevBootApplication.java.ftl
...t/src/main/java/%SYS_PKGPATH%/DevBootApplication.java.ftl
+25
-0
DevBootSecurityConfig.java.ftl
.../java/%SYS_PKGPATH%/config/DevBootSecurityConfig.java.ftl
+104
-0
application-dev.yml.ftl
SLN/%PUBPRJ%-boot/src/main/resources/application-dev.yml.ftl
+14
-0
application.yml.ftl
SLN/%PUBPRJ%-boot/src/main/resources/application.yml.ftl
+27
-0
pom.xml.ftl
SLN/%PUBPRJ%-core/pom.xml.ftl
+100
-0
%ITEM%Fallback.java.ftl
...KGPATH%/core/%MOD_PKGPATH%/client/%ITEM%Fallback.java.ftl
+132
-0
%ITEM%FeignClient.java.ftl
...ATH%/core/%MOD_PKGPATH%/client/%ITEM%FeignClient.java.ftl
+114
-0
%DE%.java.ftl
...ava/%SYS_PKGPATH%/core/%MOD_PKGPATH%/domain/%DE%.java.ftl
+0
-0
%DE%TypeHandler.java.ftl
...re/%MOD_PKGPATH%/domain/handlers/%DE%TypeHandler.java.ftl
+75
-0
%DE%SearchContext.java.ftl
...ATH%/core/%MOD_PKGPATH%/filter/%DE%SearchContext.java.ftl
+0
-0
%DE%Mapper.java.ftl
...YS_PKGPATH%/core/%MOD_PKGPATH%/mapper/%DE%Mapper.java.ftl
+108
-0
%DE%Repository.java.ftl
...TH%/core/%MOD_PKGPATH%/repository/%DE%Repository.java.ftl
+17
-0
I%DE%Service.java.ftl
...PKGPATH%/core/%MOD_PKGPATH%/service/I%DE%Service.java.ftl
+158
-0
%DE%ServiceImpl.java.ftl
.../core/%MOD_PKGPATH%/service/impl/%DE%ServiceImpl.java.ftl
+0
-0
I%DE%%ITEM%Logic.java.ftl
...ore/%MOD_PKGPATH%/service/logic/I%DE%%ITEM%Logic.java.ftl
+21
-0
%DE%%ITEM%LogicImpl.java.ftl
..._PKGPATH%/service/logic/impl/%DE%%ITEM%LogicImpl.java.ftl
+104
-0
DroolsAutoConfiguration.java.ftl
...KGPATH%/core/util/config/DroolsAutoConfiguration.java.ftl
+108
-0
LiquibaseConfiguration.java.ftl
...PKGPATH%/core/util/config/LiquibaseConfiguration.java.ftl
+76
-0
MongoDBConfig.java.ftl
...ava/%SYS_PKGPATH%/core/util/config/MongoDBConfig.java.ftl
+29
-0
MybatisAutoConfiguration.java.ftl
...GPATH%/core/util/config/MybatisAutoConfiguration.java.ftl
+19
-0
MybatisConfiguration.java.ftl
...S_PKGPATH%/core/util/config/MybatisConfiguration.java.ftl
+60
-0
DEPrivs.json.ftl
...%PUBPRJ%-core/src/main/resources/deprivs/DEPrivs.json.ftl
+28
-0
20190625112530_init_ibizsys.xml.ftl
...s/liquibase/changelog/20190625112530_init_ibizsys.xml.ftl
+99
-0
init_h2.sql.ftl
...-core/src/main/resources/liquibase/config/init_h2.sql.ftl
+17
-0
empty.xml.ftl
SLN/%PUBPRJ%-core/src/main/resources/liquibase/empty.xml.ftl
+13
-0
h2.xml.ftl
SLN/%PUBPRJ%-core/src/main/resources/liquibase/h2.xml.ftl
+16
-0
h2_table.xml.ftl
...UBPRJ%-core/src/main/resources/liquibase/h2_table.xml.ftl
+82
-0
master.xml.ftl
...%PUBPRJ%-core/src/main/resources/liquibase/master.xml.ftl
+14
-0
master_table.xml.ftl
...J%-core/src/main/resources/liquibase/master_table.xml.ftl
+13
-0
README.md.ftl
...-core/src/main/resources/liquibase/rollback/README.md.ftl
+5
-0
view.xml.ftl
SLN/%PUBPRJ%-core/src/main/resources/liquibase/view.xml.ftl
+51
-0
${de.codeName}Mapper.xml.ftl
...r/%MOD_PKGPATH%/%DE_PKGPATH%/${de.codeName}Mapper.xml.ftl
+0
-0
%DE%%ITEM%Rule.drl.ftl
...PRJ%-core/src/main/resources/rules/%DE%%ITEM%Rule.drl.ftl
+0
-0
%DE%%ITEM%RuleFlow.bpmn.ftl
...core/src/main/resources/rules/%DE%%ITEM%RuleFlow.bpmn.ftl
+0
-0
pom.xml.ftl
SLN/%PUBPRJ%-dependencies/pom.xml.ftl
+0
-0
pom.xml.ftl
...%-provider/%PUBPRJ%-provider-%SYSAPI_PKGPATH%/pom.xml.ftl
+0
-0
%PUBPRJ%-provider-%SYSAPI_PKGPATH%.yaml.ftl
...c/main/docker/%PUBPRJ%-provider-%SYSAPI_PKGPATH%.yaml.ftl
+28
-0
Dockerfile.ftl
...-provider-%SYSAPI_PKGPATH%/src/main/docker/Dockerfile.ftl
+25
-0
%SYS%%API%Application.java.ftl
..._PKGPATH%/%SYSAPI_PKGPATH%/%SYS%%API%Application.java.ftl
+31
-0
%API%AutoConfiguration.java.ftl
...%/%SYSAPI_PKGPATH%/config/%API%AutoConfiguration.java.ftl
+0
-0
%API%RestConfiguration.java.ftl
...%/%SYSAPI_PKGPATH%/config/%API%RestConfiguration.java.ftl
+0
-0
%API%SecurityConfig.java.ftl
...ATH%/%SYSAPI_PKGPATH%/config/%API%SecurityConfig.java.ftl
+0
-0
%API%ServiceProperties.java.ftl
...%/%SYSAPI_PKGPATH%/config/%API%ServiceProperties.java.ftl
+0
-0
%ITEM%DTO.java.ftl
...ava/%SYS_PKGPATH%/%SYSAPI_PKGPATH%/dto/%ITEM%DTO.java.ftl
+0
-0
%ITEM%Mapping.java.ftl
..._PKGPATH%/%SYSAPI_PKGPATH%/mapping/%ITEM%Mapping.java.ftl
+0
-0
%ITEM%Resource.java.ftl
...YS_PKGPATH%/%SYSAPI_PKGPATH%/rest/%ITEM%Resource.java.ftl
+0
-0
SwaggerConfiguration.java.ftl
.../java/%SYS_PKGPATH%/swagger/SwaggerConfiguration.java.ftl
+0
-0
application-%API_PKGPATH%-dev.yml.ftl
.../src/main/resources/application-%API_PKGPATH%-dev.yml.ftl
+0
-0
application-%API_PKGPATH%-prod.yml.ftl
...src/main/resources/application-%API_PKGPATH%-prod.yml.ftl
+0
-0
application.yml.ftl
...r-%SYSAPI_PKGPATH%/src/main/resources/application.yml.ftl
+0
-0
pom.xml.ftl
SLN/%PUBPRJ%-provider/pom.xml.ftl
+0
-0
pom.xml.ftl
SLN/%PUBPRJ%-util/pom.xml.ftl
+0
-0
DEField.java.ftl
.../main/java/%SYS_PKGPATH%/util/annotation/DEField.java.ftl
+0
-0
DEFieldDefaultValueAspect.java.ftl
...S_PKGPATH%/util/aspect/DEFieldDefaultValueAspect.java.ftl
+0
-0
IBZOUFallback.java.ftl
...ain/java/%SYS_PKGPATH%/util/client/IBZOUFallback.java.ftl
+0
-0
IBZOUFeignClient.java.ftl
.../java/%SYS_PKGPATH%/util/client/IBZOUFeignClient.java.ftl
+0
-0
IBZUAAFallback.java.ftl
...in/java/%SYS_PKGPATH%/util/client/IBZUAAFallback.java.ftl
+0
-0
IBZUAAFeignClient.java.ftl
...java/%SYS_PKGPATH%/util/client/IBZUAAFeignClient.java.ftl
+0
-0
DTOBase.java.ftl
.../src/main/java/%SYS_PKGPATH%/util/domain/DTOBase.java.ftl
+0
-0
EntityBase.java.ftl
...c/main/java/%SYS_PKGPATH%/util/domain/EntityBase.java.ftl
+0
-0
EntityClient.java.ftl
...main/java/%SYS_PKGPATH%/util/domain/EntityClient.java.ftl
+0
-0
EntityMP.java.ftl
...src/main/java/%SYS_PKGPATH%/util/domain/EntityMP.java.ftl
+0
-0
EntityMongo.java.ftl
.../main/java/%SYS_PKGPATH%/util/domain/EntityMongo.java.ftl
+0
-0
FileItem.java.ftl
...src/main/java/%SYS_PKGPATH%/util/domain/FileItem.java.ftl
+0
-0
IBZUSER.java.ftl
.../src/main/java/%SYS_PKGPATH%/util/domain/IBZUSER.java.ftl
+0
-0
LiquibaseProp.java.ftl
...ain/java/%SYS_PKGPATH%/util/domain/LiquibaseProp.java.ftl
+0
-0
MappingBase.java.ftl
.../main/java/%SYS_PKGPATH%/util/domain/MappingBase.java.ftl
+0
-0
DEFieldDefaultValueType.java.ftl
...%SYS_PKGPATH%/util/enums/DEFieldDefaultValueType.java.ftl
+0
-0
DEPredefinedFieldType.java.ftl
...a/%SYS_PKGPATH%/util/enums/DEPredefinedFieldType.java.ftl
+0
-0
BadRequestAlertException.java.ftl
...YS_PKGPATH%/util/errors/BadRequestAlertException.java.ftl
+0
-0
CustomParameterizedException.java.ftl
...KGPATH%/util/errors/CustomParameterizedException.java.ftl
+0
-0
ErrorConstants.java.ftl
...in/java/%SYS_PKGPATH%/util/errors/ErrorConstants.java.ftl
+0
-0
ExceptionTranslator.java.ftl
...va/%SYS_PKGPATH%/util/errors/ExceptionTranslator.java.ftl
+0
-0
FieldErrorVM.java.ftl
...main/java/%SYS_PKGPATH%/util/errors/FieldErrorVM.java.ftl
+0
-0
InternalServerErrorException.java.ftl
...KGPATH%/util/errors/InternalServerErrorException.java.ftl
+0
-0
ISearchContext.java.ftl
...in/java/%SYS_PKGPATH%/util/filter/ISearchContext.java.ftl
+0
-0
QueryBuildContext.java.ftl
...java/%SYS_PKGPATH%/util/filter/QueryBuildContext.java.ftl
+0
-0
QueryWrapperContext.java.ftl
...va/%SYS_PKGPATH%/util/filter/QueryWrapperContext.java.ftl
+0
-0
SearchContextBase.java.ftl
...java/%SYS_PKGPATH%/util/filter/SearchContextBase.java.ftl
+0
-0
CachedBeanCopier.java.ftl
.../java/%SYS_PKGPATH%/util/helper/CachedBeanCopier.java.ftl
+0
-0
DEFieldCacheMap.java.ftl
...n/java/%SYS_PKGPATH%/util/helper/DEFieldCacheMap.java.ftl
+0
-0
JSR310DateConverters.java.ftl
...a/%SYS_PKGPATH%/util/helper/JSR310DateConverters.java.ftl
+0
-0
UniqueNameGenerator.java.ftl
...va/%SYS_PKGPATH%/util/helper/UniqueNameGenerator.java.ftl
+0
-0
PermissionSyncJob.java.ftl
...in/java/%SYS_PKGPATH%/util/job/PermissionSyncJob.java.ftl
+0
-0
IBZUSERMapper.java.ftl
...ain/java/%SYS_PKGPATH%/util/mapper/IBZUSERMapper.java.ftl
+0
-0
AppController.java.ftl
.../main/java/%SYS_PKGPATH%/util/rest/AppController.java.ftl
+0
-0
AuthenticationController.java.ftl
...%SYS_PKGPATH%/util/rest/AuthenticationController.java.ftl
+0
-0
FileController.java.ftl
...main/java/%SYS_PKGPATH%/util/rest/FileController.java.ftl
+0
-0
AuthPermissionEvaluator.java.ftl
...S_PKGPATH%/util/security/AuthPermissionEvaluator.java.ftl
+0
-0
AuthTokenUtil.java.ftl
...n/java/%SYS_PKGPATH%/util/security/AuthTokenUtil.java.ftl
+0
-0
AuthenticationEntryPoint.java.ftl
..._PKGPATH%/util/security/AuthenticationEntryPoint.java.ftl
+0
-0
AuthenticationInfo.java.ftl
...a/%SYS_PKGPATH%/util/security/AuthenticationInfo.java.ftl
+0
-0
AuthenticationUser.java.ftl
...a/%SYS_PKGPATH%/util/security/AuthenticationUser.java.ftl
+0
-0
AuthorizationLogin.java.ftl
...a/%SYS_PKGPATH%/util/security/AuthorizationLogin.java.ftl
+0
-0
AuthorizationTokenFilter.java.ftl
..._PKGPATH%/util/security/AuthorizationTokenFilter.java.ftl
+0
-0
SpringContextHolder.java.ftl
.../%SYS_PKGPATH%/util/security/SpringContextHolder.java.ftl
+0
-0
AuthenticationUserService.java.ftl
..._PKGPATH%/util/service/AuthenticationUserService.java.ftl
+0
-0
FileService.java.ftl
...main/java/%SYS_PKGPATH%/util/service/FileService.java.ftl
+0
-0
IBZUSERService.java.ftl
...n/java/%SYS_PKGPATH%/util/service/IBZUSERService.java.ftl
+0
-0
IBZUSERServiceImpl.java.ftl
...va/%SYS_PKGPATH%/util/service/IBZUSERServiceImpl.java.ftl
+0
-0
SimpleFileService.java.ftl
...ava/%SYS_PKGPATH%/util/service/SimpleFileService.java.ftl
+0
-0
SimpleUserService.java.ftl
...ava/%SYS_PKGPATH%/util/service/SimpleUserService.java.ftl
+0
-0
application-sys.yml.ftl
SLN/%PUBPRJ%-util/src/main/resources/application-sys.yml.ftl
+0
-0
.gitignore.ftl
SLN/.gitignore.ftl
+0
-0
README.md.ftl
SLN/README.md.ftl
+0
-0
config.xml.ftl
SLN/config.xml.ftl
+0
-0
pom.xml.ftl
SLN/pom.xml.ftl
+0
-0
未找到文件。
.ibizproject
0 → 100644
浏览文件 @
7fe90329
javaee
\ No newline at end of file
README.md
0 → 100644
浏览文件 @
7fe90329
# **iBiz4j Spring R7 Template**
### 技术栈
我们的目标为您生成一个完整和现代Web应用或者微服务架构, 具体如下:
#### 完整的[Spring应用](https://spring.io/):
*
基于
[
Spring Boot
](
https://projects.spring.io/spring-boot/
)
提供应用配置简化
*
[
Maven
](
https://maven.apache.org/
)
构建,测试,运行应用
*
[
Spring Security
](
https://docs.spring.io/spring-security/site/index.html
)
组件
*
[
JSON Web令牌(JWT)
](
https://jwt.io/
)
身份验证安全机制
*
[
Spring MVC REST
](
https://spring.io/guides/gs/rest-service/
)
+
[
Jackson
](
https://github.com/FasterXML/jackson
)
*
[
Swagger
](
https://swagger.io/
)
来自动生成REST Controller API文档
*
[
Zalando Problem Spring Web
](
https://github.com/zalando/problem-spring-web
)
处理异常
*
~~基于Spring websocket组件, 可选的Websocket支持~~
*
[
Mybatis-plus
](
https://mp.baomidou.com/
)
/
[
Spring Data JPA
](
https://projects.spring.io/spring-data-jpa/
)
和Bean校验
*
基于
[
Liquibase
](
http://www.liquibase.org/
)
数据库更新
*
[
Elasticsearch
](
https://github.com/elastic/elasticsearch
)
支持,如果你需要基于你的数据库提供高级搜索能力
*
[
MongoDB
](
https://www.mongodb.org/
)
支持, 如果你想使用面向文档的NOSQL数据库替代JPA
*
[
~~Cassandra~~
](
https://cassandra.apache.org/
)
~~支持, 如果你想使用面向列的NOSQL数据库替代JPA~~
*
[
RocketMQ
](
http://rocketmq.apache.org/
)
支持, 如果你需要一个消息发布订阅系统
*
构建标准可执行的JAR文件
#### 微服务[Microservices](https://microservices.io):
*
基于
[
Netflix Zuul
](
https://github.com/Netflix/zuul
)
的HTTP流量路由
*
基于
[
Nacos
](
https://nacos.io/zh-cn/index.html
)
或
[
Eureka
](
https://github.com/Netflix/eureka
)
的服务发现
*
基于
[
Feign
](
https://github.com/OpenFeign/feign
)
的服务消费客户端
#### 生产环境组件:
*
使用
[
Druid
](
https://github.com/alibaba/druid
)
和
[
ELK Stack
](
https://www.elastic.co/products
)
监控
*
使用
[
Caffeine
](
https://github.com/ben-manes/caffeine
)
+
[
Redis
](
https://redis.io/
)
提供两级缓存
*
静态资源优化 (gzip filter, HTTP cache headers)
*
使用
[
Logback
](
http://logback.qos.ch/
)
管理日志,可在运行时配置日志输出
*
使用
[
dynamic datasource
](
https://gitee.com/baomidou/dynamic-datasource-spring-boot-starter
)
多库切换和读写分离,极致的性能提升
*
使用
[
xxl-job
](
https://github.com/xuxueli/xxl-job
)
任务调度引擎
*
完整的
[
Docker
](
https://www.docker.com/
)
和
[
Docker Compose
](
https://github.com/docker/compose
)
支持
*
~~支持云服务提供商: …~~
\ No newline at end of file
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/pom.xml.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>${pub.getCodeName()?lower_case}-app</artifactId>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<version>${pub.getVersionString()?default("V0.0.1_alpha")}</version>
</parent>
<artifactId>${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}</artifactId>
<name>${pub.getCodeName()?lower_case?cap_first} Gateway ${app.getPKGCodeName()}</name>
<description>${pub.getCodeName()?lower_case?cap_first} ${app.getPKGCodeName()}</description>
<dependencies>
<dependency>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<artifactId>${pub.getCodeName()?lower_case}-util</artifactId>
<version>${r'${project.version}'}</version>
</dependency>
<#if app.getAppMode()?? && app.getAppMode() == "WFAPP">
<dependency>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<artifactId>${pub.getCodeName()?lower_case}-workflow</artifactId>
<version>${r'${project.version}'}</version>
</dependency>
</#if>
</dependencies>
<properties>
<docker.image.prefix>registry.cn-shanghai.aliyuncs.com/ibizsys</docker.image.prefix>
</properties>
<profiles>
<profile>
<id>${app.getPKGCodeName()?lower_case}</id>
<build>
<resources>
<resource>
<directory>${r'${basedir}'}/src/main/webapp</directory>
<!--注意此次必须要放在此目录下才能被访问到 -->
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
<resource>
<directory>${r'${basedir}'}/src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>exec-yarn-run-install</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<workingDirectory>../../app_${app.getPKGCodeName()}</workingDirectory>
</configuration>
</execution>
<execution>
<id>exec-yarn-run-build</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<arguments>
<argument>build</argument>
</arguments>
<workingDirectory>../../app_${app.getPKGCodeName()}</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}</finalName>
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
<mainClass>${pub.getPKGCodeName()}.${app.getPKGCodeName()?lower_case}.${app.getPKGCodeName()}Application</mainClass>
<outputDirectory>../../</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<serverId>ibiz-dev</serverId>
<imageName>${r'${docker.image.prefix}/${project.artifactId}'}:latest</imageName>
<dockerDirectory>${r'${project.basedir}'}/src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>../../</directory>
<include>${r'${project.artifactId}'}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/src/main/docker/%PUBPRJ%-app-%APP_PKGPATH%.yaml.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#assign httpPort = "8080">
<#if sysrun?? >
<#if sysrun.getPSDevSlnMSDepApp()??>
<#if sysrun.getPSDevSlnMSDepApp().getHttpPort()??>
<#assign httpPort = sysrun.getPSDevSlnMSDepApp().getHttpPort()?c>
</#if>
</#if>
</#if>
version: "3.2"
services:
${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}:latest
ports:
- "${httpPort}:${httpPort}"
networks:
- agent_network
deploy:
mode: replicated
replicas: 1
networks:
agent_network:
driver: overlay
attachable: true
\ No newline at end of file
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/src/main/docker/Dockerfile.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#assign httpPort = "8080">
<#if sysrun?? >
<#if sysrun.getPSDevSlnMSDepApp()??>
<#if sysrun.getPSDevSlnMSDepApp().getHttpPort()??>
<#assign httpPort = sysrun.getPSDevSlnMSDepApp().getHttpPort()?c>
</#if>
</#if>
</#if>
FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBZ_SLEEP=0 \
JAVA_OPTS=""
CMD echo "The application will start in ${r'${IBZ_SLEEP}'}s..." && \
sleep ${r'${IBZ_SLEEP}'} && \
java ${r'${JAVA_OPTS}'} -Djava.security.egd=file:/dev/./urandom -jar /${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.jar
EXPOSE ${httpPort}
ADD ${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.jar /${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.jar
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/src/main/java/%SYS_PKGPATH%/%APP_PKGPATH%/%APP%Application.java.ftl
0 → 100644
浏览文件 @
7fe90329
<#
ibiztemplate
>
TARGET
=
PSSYSAPP
</#
ibiztemplate
>
package
${
pub
.
getPKGCodeName
()}.${
app
.
getPKGCodeName
()?
lower_case
};
import
lombok
.
extern
.
slf4j
.
Slf4j
;
import
org
.
springframework
.
boot
.
autoconfigure
.
SpringBootApplication
;
import
org
.
springframework
.
cloud
.
client
.
discovery
.
EnableDiscoveryClient
;
import
org
.
springframework
.
cloud
.
netflix
.
zuul
.
EnableZuulProxy
;
import
org
.
springframework
.
cloud
.
openfeign
.
EnableFeignClients
;
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
;
@
Slf4j
@
Import
({
FeignClientsConfiguration
.
class
})
@
EnableDiscoveryClient
@
Configuration
@
EnableFeignClients
@
EnableZuulProxy
@
ComponentScan
(
basePackages
=
{
"${pub.getPKGCodeName()}"
})
@
MapperScan
(
"${pub.getPKGCodeName()}.*.mapper"
)
@
SpringBootApplication
(
exclude
=
{
org
.
springframework
.
boot
.
autoconfigure
.
security
.
servlet
.
SecurityAutoConfiguration
.
class
,
})
public
class
${
app
.
getPKGCodeName
()}
Application
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(${
app
.
getPKGCodeName
()}
Application
.
class
,
args
);
}
}
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/src/main/java/%SYS_PKGPATH%/%APP_PKGPATH%/config/%APP%SecurityConfig.java.ftl
0 → 100644
浏览文件 @
7fe90329
<#
ibiztemplate
>
TARGET
=
PSSYSAPP
</#
ibiztemplate
>
package
${
pub
.
getPKGCodeName
()}.${
app
.
getPKGCodeName
()?
lower_case
}.
config
;
import
${
pub
.
getPKGCodeName
()}.
util
.
security
.
AuthenticationEntryPoint
;
import
${
pub
.
getPKGCodeName
()}.
util
.
security
.
AuthorizationTokenFilter
;
import
${
pub
.
getPKGCodeName
()}.
util
.
service
.
AuthenticationUserService
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Value
;
import
org
.
springframework
.
context
.
annotation
.
Bean
;
import
org
.
springframework
.
context
.
annotation
.
Configuration
;
import
org
.
springframework
.
http
.
HttpMethod
;
import
org
.
springframework
.
security
.
authentication
.
AuthenticationManager
;
import
org
.
springframework
.
security
.
config
.
annotation
.
authentication
.
builders
.
AuthenticationManagerBuilder
;
import
org
.
springframework
.
security
.
config
.
annotation
.
method
.
configuration
.
EnableGlobalMethodSecurity
;
import
org
.
springframework
.
security
.
config
.
annotation
.
web
.
builders
.
HttpSecurity
;
import
org
.
springframework
.
security
.
config
.
annotation
.
web
.
configuration
.
EnableWebSecurity
;
import
org
.
springframework
.
security
.
config
.
annotation
.
web
.
configuration
.
WebSecurityConfigurerAdapter
;
import
org
.
springframework
.
security
.
config
.
core
.
GrantedAuthorityDefaults
;
import
org
.
springframework
.
security
.
config
.
http
.
SessionCreationPolicy
;
import
org
.
springframework
.
security
.
crypto
.
bcrypt
.
BCryptPasswordEncoder
;
import
org
.
springframework
.
security
.
crypto
.
password
.
PasswordEncoder
;
import
org
.
springframework
.
security
.
web
.
authentication
.
UsernamePasswordAuthenticationFilter
;
import
org
.
springframework
.
context
.
annotation
.
Profile
;
@
Profile
(
"${app.getPKGCodeName()?lower_case}-prod"
)
@
Configuration
@
EnableWebSecurity
public
class
${
app
.
getPKGCodeName
()}
SecurityConfig
extends
WebSecurityConfigurerAdapter
{
@
Autowired
private
AuthenticationEntryPoint
unauthorizedHandler
;
@
Autowired
private
AuthenticationUserService
userDetailsService
;
/**
*
自定义基于
JWT
的安全过滤器
*/
@
Autowired
AuthorizationTokenFilter
authenticationTokenFilter
;
@
Value
(
"${r'${ibiz.auth.path:v7/login}"
'})
private String loginPath;
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth
.userDetailsService(userDetailsService)
.passwordEncoder(passwordEncoderBean());
}
@Bean
GrantedAuthorityDefaults grantedAuthorityDefaults() {
// Remove the ROLE_ prefix
return new GrantedAuthorityDefaults("");
}
@Bean
public PasswordEncoder passwordEncoderBean() {
return new BCryptPasswordEncoder();
}
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity
// 禁用 CSRF
.csrf().disable()
// 授权异常
.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
// 不创建会话
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
// 过滤请求
.authorizeRequests()
.antMatchers(
HttpMethod.GET,
"/*.html",
"/**/*.html",
"/**/*.css",
"/**/*.js",
"/**/*.ico",
"/**/assets/**",
"/**/css/**",
"/**/fonts/**",
"/**/js/**",
"/**/img/**",
"/"
).permitAll()
//放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
// 所有请求都需要认证
.anyRequest().authenticated()
// 防止iframe 造成跨域
.and().headers().frameOptions().disable();
httpSecurity
.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
}
}
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/src/main/resources/application-%APP_PKGPATH%-dev.yml.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#assign httpPort = "8080">
<#if sysrun?? >
<#if sysrun.getPSDevSlnMSDepApp()??>
<#if sysrun.getPSDevSlnMSDepApp().getHttpPort()??>
<#assign httpPort = sysrun.getPSDevSlnMSDepApp().getHttpPort()?c>
</#if>
</#if>
</#if>
server:
port: ${httpPort}
\ No newline at end of file
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/src/main/resources/application-%APP_PKGPATH%-prod.yml.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#assign httpPort = "8080">
<#if sysrun?? >
<#if sysrun.getPSDevSlnMSDepApp()??>
<#if sysrun.getPSDevSlnMSDepApp().getHttpPort()??>
<#assign httpPort = sysrun.getPSDevSlnMSDepApp().getHttpPort()?c>
</#if>
</#if>
</#if>
server:
port: ${httpPort}
<#if item.getAllPSAppDataEntities?? && app.getAllPSAppDataEntities()??>
#zuul网关路由设置
zuul:
routes:
<#list item.getAllPSAppDataEntities() as appDataEntity>
<#assign serviceId="">
<#assign serviceUrl=srfpluralize(appDataEntity.codeName?lower_case)>
<#assign appEntity=appDataEntity.name?lower_case>
<#assign psDataEntity=appDataEntity.getPSDataEntity()>
<#assign systemName=sys.getCodeName()?lower_case>
<#if psDataEntity.getStorageMode()==4>
<#comment>serviceApi模式</#comment>
<#assign serviceId=(psDataEntity.getPSSubSysServiceAPI().getServiceCodeName())!''>
<#assign serviceUrl=srfpluralize(appDataEntity.name?lower_case)>
<#else>
<#assign sysApi=appDataEntity.getPSDEServiceAPI().getPSSysServiceAPI().codeName?lower_case>
<#assign deApi=appDataEntity.getPSDEServiceAPI().codeName?lower_case>
<#assign serviceId=systemName+"-"+sysApi>
</#if>
${appEntity}:
path: /${serviceUrl}/**
serviceId: ${serviceId}
stripPrefix: false
</#list>
<#comment>通过设置该参数,避免Zuul转发请求时丢失Authorization请求头信息</#comment>
sensitive-headers:
- Cookie,Set-Cookie,Authorization
</#if>
SLN/%PUBPRJ%-app/%PUBPRJ%-app-%APP_PKGPATH%/src/main/resources/application.yml.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
spring:
profiles:
include: sys , ${app.getPKGCodeName()?lower_case}-prod
application:
name: ${sys.getCodeName()?lower_case}-${app.getPKGCodeName()?lower_case}
SLN/%PUBPRJ%-app/pom.xml.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>${pub.getCodeName()?lower_case}</artifactId>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<version>${pub.getVersionString()?default("V0.0.1_alpha")}</version>
</parent>
<artifactId>${pub.getCodeName()?lower_case}-app</artifactId>
<name>${pub.getCodeName()?lower_case?cap_first} Application</name>
<description>${pub.getCodeName()?lower_case?cap_first} Application</description>
<packaging>pom</packaging>
<#-- modules -->
<#if sys.getAllPSApps()??>
<modules>
<#list sys.getAllPSApps() as app>
<module>${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}</module>
</#list>
</modules>
</#if>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<#--<dependency>-->
<#--<groupId>org.springframework.cloud</groupId>-->
<#--<artifactId>spring-cloud-starter-security</artifactId>-->
<#--<version>2.1.1.RELEASE</version>-->
<#--</dependency>-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
<#--<dependency>-->
<#--<groupId>org.springframework.security</groupId>-->
<#--<artifactId>spring-security-cas</artifactId>-->
<#--</dependency>-->
<#--<dependency>-->
<#--<groupId>${pub.getPKGCodeName()?lower_case}</groupId>-->
<#--<artifactId>${pub.getCodeName()?lower_case}-util</artifactId>-->
<#--<version>${r'${project.version}'}</version>-->
<#--</dependency>-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
</dependencies>
</project>
SLN/%PUBPRJ%-boot/pom.xml.ftl
0 → 100644
浏览文件 @
7fe90329
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>${pub.getCodeName()?lower_case}</artifactId>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<version>${pub.getVersionString()?default("V0.0.1_alpha")}</version>
</parent>
<artifactId>${pub.getCodeName()?lower_case}-boot</artifactId>
<name>${pub.getCodeName()?lower_case?cap_first} Dev Monolithic Boot</name>
<description>${pub.getCodeName()?lower_case?cap_first} Boot</description>
<dependencies>
<dependency>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<artifactId>${pub.getCodeName()?lower_case}-core</artifactId>
<version>${r'${project.version}'}</version>
</dependency>
<#comment>引入后台服务接口</#comment>
<#if sys.getAllPSSysServiceAPIs()??>
<#list sys.getAllPSSysServiceAPIs() as sysapi>
<dependency>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<artifactId>${pub.getCodeName()?lower_case}-provider-${sysapi.getCodeName()?lower_case}</artifactId>
<version>${r'${project.version}'}</version>
</dependency>
</#list>
</#if>
<#comment>引入前端应用</#comment>
<#if sys.getAllPSApps()??>
<#list sys.getAllPSApps() as sysApp>
<dependency>
<groupId>${pub.getPKGCodeName()?lower_case}</groupId>
<artifactId>${pub.getCodeName()?lower_case}-app-${sysApp.getPKGCodeName()?lower_case}</artifactId>
<version>${r'${project.version}'}</version>
</dependency>
</#list>
</#if>
</dependencies>
<!--由于boot是通过dependency来关联所有子项目,页面和配置等信息都存在与子项目中,
所以您在对boot进行打包前,需要先将子项目install到maven仓库,以确保boot可以正常引用所有完整的子项目-->
<profiles>
<profile>
<id>boot</id>
<build>
<resources>
<resource>
<directory>${r'${basedir}'}/src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>${pub.codeName?lower_case}</finalName>
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
<mainClass>${pub.getPKGCodeName()}.DevBootApplication</mainClass>
<outputDirectory>../</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
SLN/%PUBPRJ%-boot/src/main/java/%SYS_PKGPATH%/DevBootApplication.java.ftl
0 → 100644
浏览文件 @
7fe90329
<#
ibiztemplate
>
TARGET
=
PSSYSTEM
</#
ibiztemplate
>
package
${
pub
.
getPKGCodeName
()};
import
lombok
.
extern
.
slf4j
.
Slf4j
;
import
org
.
springframework
.
boot
.
autoconfigure
.
SpringBootApplication
;
import
org
.
springframework
.
cloud
.
client
.
discovery
.
EnableDiscoveryClient
;
import
org
.
springframework
.
context
.
annotation
.
Configuration
;
import
org
.
springframework
.
transaction
.
annotation
.
EnableTransactionManagement
;
import
org
.
springframework
.
boot
.
SpringApplication
;
import
org
.
springframework
.
cloud
.
openfeign
.
EnableFeignClients
;
@
Slf4j
@
EnableDiscoveryClient
@
Configuration
@
EnableTransactionManagement
@
SpringBootApplication
@
EnableFeignClients
(
basePackages
=
{
"${pub.getPKGCodeName()}"
})
public
class
DevBootApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
DevBootApplication
.
class
,
args
);
}
}
SLN/%PUBPRJ%-boot/src/main/java/%SYS_PKGPATH%/config/DevBootSecurityConfig.java.ftl
0 → 100644
浏览文件 @
7fe90329
<#
ibiztemplate
>
TARGET
=
PSSYSSERVICEAPI
</#
ibiztemplate
>
package
${
pub
.
getPKGCodeName
()}.
config
;
import
${
pub
.
getPKGCodeName
()}.
util
.
security
.
AuthenticationEntryPoint
;
import
${
pub
.
getPKGCodeName
()}.
util
.
security
.
AuthorizationTokenFilter
;
import
${
pub
.
getPKGCodeName
()}.
util
.
service
.
AuthenticationUserService
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Value
;
import
org
.
springframework
.
context
.
annotation
.
Bean
;
import
org
.
springframework
.
context
.
annotation
.
Configuration
;
import
org
.
springframework
.
http
.
HttpMethod
;
import
org
.
springframework
.
security
.
authentication
.
AuthenticationManager
;
import
org
.
springframework
.
security
.
config
.
annotation
.
authentication
.
builders
.
AuthenticationManagerBuilder
;
import
org
.
springframework
.
security
.
config
.
annotation
.
method
.
configuration
.
EnableGlobalMethodSecurity
;
import
org
.
springframework
.
security
.
config
.
annotation
.
web
.
builders
.
HttpSecurity
;
import
org
.
springframework
.
security
.
config
.
annotation
.
web
.
configuration
.
EnableWebSecurity
;
import
org
.
springframework
.
security
.
config
.
annotation
.
web
.
configuration
.
WebSecurityConfigurerAdapter
;
import
org
.
springframework
.
security
.
config
.
core
.
GrantedAuthorityDefaults
;
import
org
.
springframework
.
security
.
config
.
http
.
SessionCreationPolicy
;
import
org
.
springframework
.
security
.
crypto
.
bcrypt
.
BCryptPasswordEncoder
;
import
org
.
springframework
.
security
.
crypto
.
password
.
PasswordEncoder
;
import
org
.
springframework
.
security
.
web
.
authentication
.
UsernamePasswordAuthenticationFilter
;
@
Configuration
@
EnableWebSecurity