Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
a23a2843
提交
a23a2843
编写于
7月 22, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更改配置文件
上级
27d74f15
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
126 行增加
和
3 行删除
+126
-3
SubServiceApiModel.java
...ain/java/cn/ibizlab/codegen/model/SubServiceApiModel.java
+23
-0
SystemModel.java
...e/src/main/java/cn/ibizlab/codegen/model/SystemModel.java
+16
-1
IBizRuntimeApplication.java.hbs
...main/java/{{packageName}}/IBizRuntimeApplication.java.hbs
+13
-2
application-boot.yml.hbs
...me}}-provider/src/main/resources/application-boot.yml.hbs
+74
-0
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/SubServiceApiModel.java
浏览文件 @
a23a2843
...
@@ -5,6 +5,7 @@ import lombok.NoArgsConstructor;
...
@@ -5,6 +5,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
net.ibizsys.model.service.IPSSubSysServiceAPI
;
import
net.ibizsys.model.service.IPSSubSysServiceAPI
;
import
net.ibizsys.model.system.IPSSystemModule
;
import
java.util.*
;
import
java.util.*
;
...
@@ -32,4 +33,26 @@ public class SubServiceApiModel extends BaseModel {
...
@@ -32,4 +33,26 @@ public class SubServiceApiModel extends BaseModel {
return
subEntityApi
.
get
(
codeName
);
return
subEntityApi
.
get
(
codeName
);
}
}
public
IPSSubSysServiceAPI
getPSSubSysServiceAPI
()
{
return
(
IPSSubSysServiceAPI
)
opt
;
}
public
String
module
;
public
String
getModule
()
{
if
(
module
==
null
)
{
IPSSystemModule
systemModule
=
getPSSubSysServiceAPI
().
getPSSystemModule
();
if
(
systemModule
!=
null
&&
systemModule
.
getCodeName
()!=
null
&&
systemModule
.
getPSSysModelGroup
()
==
null
)
{
module
=
getPSSubSysServiceAPI
().
getPSSystemModule
().
getCodeName
().
toLowerCase
();
if
(
"rt"
.
equals
(
module
))
module
=
""
;
}
else
module
=
""
;
}
return
module
;
}
}
}
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/SystemModel.java
浏览文件 @
a23a2843
...
@@ -57,6 +57,7 @@ public class SystemModel extends BaseModel {
...
@@ -57,6 +57,7 @@ public class SystemModel extends BaseModel {
this
.
setPackageName
(
system
.
getCodeName
().
toLowerCase
());
this
.
setPackageName
(
system
.
getCodeName
().
toLowerCase
());
}
}
getEntitiesMap
();
getEntitiesMap
();
getSubServiceApiMap
();
}
}
public
IPSSystem
getSystem
()
{
public
IPSSystem
getSystem
()
{
...
@@ -217,11 +218,25 @@ public class SystemModel extends BaseModel {
...
@@ -217,11 +218,25 @@ public class SystemModel extends BaseModel {
private
Map
<
String
,
SubServiceApiModel
>
subServiceApiMap
;
private
Map
<
String
,
SubServiceApiModel
>
subServiceApiMap
;
private
Map
<
String
,
List
<
SubServiceApiModel
>>
subServiceApiModules
;
public
synchronized
Map
<
String
,
SubServiceApiModel
>
getSubServiceApiMap
()
{
public
synchronized
Map
<
String
,
SubServiceApiModel
>
getSubServiceApiMap
()
{
if
(
subServiceApiMap
==
null
)
{
if
(
subServiceApiMap
==
null
)
{
subServiceApiMap
=
new
LinkedHashMap
<>();
subServiceApiMap
=
new
LinkedHashMap
<>();
getSystem
().
getAllPSSubSysServiceAPIs
().
forEach
(
subSysServiceAPI
->
{
getSystem
().
getAllPSSubSysServiceAPIs
().
forEach
(
subSysServiceAPI
->
{
subServiceApiMap
.
put
(
subSysServiceAPI
.
getCodeName
(),
new
SubServiceApiModel
(
subSysServiceAPI
).
setSystem
(
this
));
SubServiceApiModel
subapi
=
new
SubServiceApiModel
(
subSysServiceAPI
).
setSystem
(
this
);
subServiceApiMap
.
put
(
subSysServiceAPI
.
getCodeName
(),
subapi
);
String
module
=
subapi
.
getModule
();
if
(!
StringUtils
.
isEmpty
(
module
))
{
if
(
subServiceApiModules
==
null
)
subServiceApiModules
=
new
LinkedHashMap
<>();
if
(!
subServiceApiModules
.
containsKey
(
module
))
subServiceApiModules
.
put
(
module
,
new
ArrayList
<>());
subServiceApiModules
.
get
(
module
).
add
(
subapi
);
}
});
});
}
}
return
subServiceApiMap
;
return
subServiceApiMap
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/ibiz-boot/{{projectName}}-provider/src/main/java/{{packageName}}/IBizRuntimeApplication.java.hbs
浏览文件 @
a23a2843
...
@@ -5,10 +5,21 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -5,10 +5,21 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan;
import net.ibizsys.central.cloud.core.spring.configuration.NacosServiceHubSetting;
import net.ibizsys.central.cloud.core.spring.rt.ServiceHub;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableDiscoveryClient(autoRegister=false)
@EnableDiscoveryClient(autoRegister=false)
@SpringBootApplication(exclude= SecurityAutoConfiguration.class)
@SpringBootApplication(exclude = {
{{#
unless
system
.
enableMongo
}}
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
{{/
unless
}}
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure.class,SecurityAutoConfiguration.class})
@ComponentScan({"net.ibizsys.central.cloud.core.spring","net.ibizsys.central.plugin.boot.core","
{{
packageName
}}
"})
@ComponentScan(basePackages = {"net.ibizsys.central.cloud.core.spring","net.ibizsys.central.plugin.boot.core","
{{
packageName
}}
"},excludeFilters = {
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {NacosServiceHubSetting.class,ServiceHub.class})
})
@EnableAsync
@EnableScheduling
@EnableTransactionManagement
public class IBizRuntimeApplication {
public class IBizRuntimeApplication {
public static void main(String[] args) {
public static void main(String[] args) {
...
...
modules/ibizlab-generator-core/src/main/resources/templ/ibiz-boot/{{projectName}}-provider/src/main/resources/application-boot.yml.hbs
0 → 100644
浏览文件 @
a23a2843
spring:
datasource:
druid:
# 监控页面
web-stat-filter:
enabled: true
url-pattern: /*
profileEnable: true
exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: admin
login-password: admin
dynamic:
druid: #以下是全局默认值,可以全局更改
filters: stat,slf4j
useGlobalDataSourceStat: true
stat:
log-slow-sql: true
merge-sql: true
slow-sql-millis: 10000
ibiz:
filePath: /app/file/
deploysystems:
gateway:
settings:
sysdbscheme:
default:
datasource: rtds
sysutil:
unistate:
serviceurl: ${zookeeper.address:127.0.0.1:2181}
cache:
serviceurl: ${spring.redis.host:127.0.0.1}:${spring.redis.port:6379}
{{
lowerCase
system
.
name
}}
:
runtimeClassName:
{{
packageName
}}
.runtime.SystemRuntime
settings:
sysdbscheme:
default:
datasource:
{{
lowerCase
system
.
name
}}
__default
dbtype: ${spring.datasource.dbtype:MYSQL}
{{#if
system
.
subServiceApiModules
}}
subsysserviceapi:
{{#
each
system
.
subServiceApiModules
as
|
submodule
|
}}
{{
@key
}}
:
{{#
each
submodule
as
|
apiitem
|
}}
{{
lowerCase
apiitem
.
codeName
}}
:
serviceurl:
{{
apiitem
.
servicePath
}}
{{/
each
}}
{{/
each
}}
{{/if}}
servicehub:
id:
{{
lowerCase
system
.
name
}}
register-naming-service: true
publish-config: true
enableAppGateway: true
tempFolder: ${ibiz.filePath:/app/file/}temp/
reportFolder: ${ibiz.filePath:/app/file/}report/
fontFolder: ${ibiz.filePath:/app/file/}font/
fileFolder: ${ibiz.filePath:/app/file/}
loadDeploySystems:
- gateway
-
{{
lowerCase
system
.
name
}}
systemSettings:
cloudclientutil:
serviceurl: lb://ebsx-oldapi
accesstokenurl: lb://ibizcloud-uaa/v7/login
clientid: aibizhi
clientsecret: 123456
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录