Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
S
SpringBoot_Templ
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
esestt
SpringBoot_Templ
提交
5bbb4ed0
提交
5bbb4ed0
编写于
9月 04, 2019
作者:
zhouweidong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
d5876551
变更
7
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
96 行增加
和
60 行删除
+96
-60
pom.xml.ftl
SLN/%PUBPRJ%-srv/pom.xml.ftl
+30
-5
%DE%Controller.java.ftl
.../%SYS_PKGPATH%/%MOD_PKGPATH%/rest/%DE%Controller.java.ftl
+19
-4
%DE%Service.java.ftl
.../%SYS_PKGPATH%/%MOD_PKGPATH%/service/%DE%Service.java.ftl
+24
-0
%DE%ServiceImpl.java.ftl
...PATH%/%MOD_PKGPATH%/service/impl/%DE%ServiceImpl.java.ftl
+18
-0
%PUBPRJ%Main.java.ftl
...RJ%-srv/src/main/java/%SYS_PKGPATH%/%PUBPRJ%Main.java.ftl
+1
-0
application.yml.ftl
SLN/%PUBPRJ%-srv/src/main/resources/application.yml.ftl
+4
-5
pom.xml.ftl
SLN/pom.xml.ftl
+0
-46
未找到文件。
SLN/%PUBPRJ%-srv/pom.xml.ftl
浏览文件 @
5bbb4ed0
<#ibiztemplate>
<#ibiztemplate>
TARGET=PS
DATAENTITY
TARGET=PS
SYSTEM
</#ibiztemplate>
</#ibiztemplate>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
@@ -8,9 +8,34 @@ TARGET=PSDATAENTITY
...
@@ -8,9 +8,34 @@ TARGET=PSDATAENTITY
<name>${pub.getCodeName()?lower_case}-srv</name>
<name>${pub.getCodeName()?lower_case}-srv</name>
<packaging>jar</packaging>
<packaging>jar</packaging>
<parent>
<parent>
<artifactId>${sys.codeName}</artifactId>
<groupId>org.springframework.boot</groupId>
<groupId>${pub.getPKGCodeName()}</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>2.0.1.RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>
</parent>
<properties>
<junit.version>4.12</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${r'${junit.version}'}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies>
</project>
</project>
\ No newline at end of file
SLN/%PUBPRJ%-srv/src/main/java/%SYS_PKGPATH%/%MOD_PKGPATH%/rest/%DE%Controller.java.ftl
浏览文件 @
5bbb4ed0
...
@@ -7,15 +7,30 @@ package ${pub.getPKGCodeName()}.${de.getPSSystemModule().codeName?lower_case}.re
...
@@ -7,15 +7,30 @@ package ${pub.getPKGCodeName()}.${de.getPSSystemModule().codeName?lower_case}.re
import
org
.
springframework
.
web
.
bind
.
annotation
.
PostMapping
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
PostMapping
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RestController
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RestController
;
import
${
pub
.
getPKGCodeName
()}.${
de
.
getPSSystemModule
().
codeName
?
lower_case
}.
domain
.${
de
.
codeName
};
import
${
pub
.
getPKGCodeName
()}.${
de
.
getPSSystemModule
().
codeName
?
lower_case
}.
domain
.${
de
.
codeName
};
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
import
${
pub
.
getPKGCodeName
()}.${
de
.
getPSSystemModule
().
codeName
?
lower_case
}.
service
.${
de
.
codeName
}
Service
;
@
RestController
@
RestController
public
class
${
de
.
codeName
}
Controller
{
public
class
${
de
.
codeName
}
Controller
{
<#
assign
appReqUrl
=
"/"
+
app
.
getPKGCodeName
()?
lower_case
+
"/"
+
de
.
getPSSystemModule
().
codeName
?
lower_case
+
"/"
+
de
.
codeName
?
lower_case
><#
comment
>
拼接当前应用的请求路径
</#
comment
>
<#
assign
appReqUrl
=
"/"
+
app
.
getPKGCodeName
()?
lower_case
+
"/"
+
de
.
getPSSystemModule
().
codeName
?
lower_case
+
"/"
+
de
.
codeName
?
lower_case
><#
comment
>
当前实体请求路径
</#
comment
>
@
PostMapping
(
value
=
"${appReqUrl}"
)
<#
comment
>
注入当前实体的服务对象
</#
comment
>
public
${
de
.
codeName
}
index
(){
@
Autowired
${
de
.
codeName
}
entity
=
new
${
de
.
codeName
}();
private
${
de
.
codeName
}
Service
${
de
.
codeName
?
lower_case
}
Service
;
<#
list
item
.
getPSControls
()
as
ctrl
><#
comment
>
输出实体所使用到的部件(实体用到的部件可能有:表格、表单、树视图等)
</#
comment
>
<#
if
ctrl
.
getControlType
()
==
'FORM'
><#
comment
>
本示例中只展示表单
</#
comment
>
<#
list
ctrl
.
getPSAjaxControlHandler
().
getPSAjaxHandlerActions
()
as
action
><#
comment
>
输出表单行为:
(
新建、编辑、删除等
)</#
comment
>
<#
if
action
.
getActionName
()==
'Create'
><#
comment
>
本示例中只展示表单新建逻辑
</#
comment
>
@
PostMapping
(
value
=
"${appReqUrl}/form/create"
)
public
${
de
.
codeName
}
formCreate
(${
de
.
codeName
}
entity
){
return
entity
;
return
entity
;
}
}
<#
break
>
</#
if
>
</#
list
>
<#
break
>
</#
if
>
</#
list
>
}
}
SLN/%PUBPRJ%-srv/src/main/java/%SYS_PKGPATH%/%MOD_PKGPATH%/service/%DE%Service.java.ftl
0 → 100644
浏览文件 @
5bbb4ed0
<#
ibiztemplate
>
TARGET
=
PSDATAENTITY
</#
ibiztemplate
>
package
${
pub
.
getPKGCodeName
()}.${
item
.
getPSSystemModule
().
codeName
?
lower_case
}.
service
;
import
${
pub
.
getPKGCodeName
()}.${
item
.
getPSSystemModule
().
codeName
?
lower_case
}.
domain
.${
item
.
codeName
};
import
com
.
baomidou
.
mybatisplus
.
extension
.
service
.
IService
;
/**
*
实体
[${
item
.
codeName
}]
服务对象接口
*/
public
interface
${
item
.
codeName
}
Service
extends
IService
<${
item
.
codeName
}>{
<#
if
item
.
getAllPSDEActions
()??>
<#
list
item
.
getAllPSDEActions
()
as
deaction
>
<#
if
(
deaction
.
getActionMode
()
==
"READ"
)
><#
comment
>
Get
与自定义行为返回
DoMain
不发带
major
</#
comment
>
${
item
.
codeName
}
${
srfmethodname
(
deaction
.
getCodeName
())}(${
item
.
codeName
}
et
);
<#
else
>
boolean
${
srfmethodname
(
deaction
.
getCodeName
())}(${
item
.
codeName
}
et
);
</#
if
>
</#
list
>
</#
if
>
}
\ No newline at end of file
SLN/%PUBPRJ%-srv/src/main/java/%SYS_PKGPATH%/%MOD_PKGPATH%/service/impl/%DE%ServiceImpl.java.ftl
0 → 100644
浏览文件 @
5bbb4ed0
<#
ibiztemplate
>
TARGET
=
PSDATAENTITY
</#
ibiztemplate
>
package
${
pub
.
getPKGCodeName
()}.${
item
.
getPSSystemModule
().
codeName
?
lower_case
}.
service
.
impl
;
import
org
.
springframework
.
stereotype
.
Service
;
import
${
pub
.
getPKGCodeName
()}.${
item
.
getPSSystemModule
().
codeName
?
lower_case
}.
mapper
.${
item
.
codeName
}
Mapper
;
import
${
pub
.
getPKGCodeName
()}.${
item
.
getPSSystemModule
().
codeName
?
lower_case
}.
domain
.${
item
.
codeName
};
import
${
pub
.
getPKGCodeName
()}.${
item
.
getPSSystemModule
().
codeName
?
lower_case
}.
service
.${
item
.
codeName
}
Service
;
import
com
.
baomidou
.
mybatisplus
.
extension
.
service
.
impl
.
ServiceImpl
;
/**
*
实体
[${
item
.
codeName
}]
服务对象接口实现
*/
@
Service
public
class
${
item
.
codeName
}
ServiceImpl
extends
ServiceImpl
<${
item
.
codeName
}
Mapper
,
${
item
.
codeName
}>
implements
${
item
.
codeName
}
Service
{
}
\ No newline at end of file
SLN/%PUBPRJ%-srv/src/main/java/%SYS_PKGPATH%/%PUBPRJ%Main.java.ftl
浏览文件 @
5bbb4ed0
...
@@ -5,6 +5,7 @@ package ${pub.getPKGCodeName()};
...
@@ -5,6 +5,7 @@ package ${pub.getPKGCodeName()};
import
org
.
springframework
.
boot
.
autoconfigure
.
SpringBootApplication
;
import
org
.
springframework
.
boot
.
autoconfigure
.
SpringBootApplication
;
import
org
.
springframework
.
boot
.
SpringApplication
;
import
org
.
springframework
.
boot
.
SpringApplication
;
import
org
.
mybatis
.
spring
.
annotation
.
MapperScan
;
@
SpringBootApplication
@
SpringBootApplication
public
class
${
pub
.
getCodeName
()?
lower_case
}
Main
{
public
class
${
pub
.
getCodeName
()?
lower_case
}
Main
{
...
...
SLN/%PUBPRJ%-srv/src/main/resources/application.yml.ftl
浏览文件 @
5bbb4ed0
<#ibiztemplate>
<#ibiztemplate>
TARGET=PSSYSTEM
TARGET=PSSYSTEM
</#ibiztemplate>
</#ibiztemplate>
<#assign dbinst = sysrun.getPSDBDevInst()>
server:
server:
port: 8080
port: 8080
servlet:
servlet:
...
@@ -9,11 +8,11 @@ server:
...
@@ -9,11 +8,11 @@ server:
spring:
spring:
datasource:
datasource:
username:
${dbinst.getUserName()}
username:
test
password: '
${dbinst.getPassword()}
'
password: '
test
'
url: jdbc:h2:mem:
${dbinst.getUserName()}
;
url: jdbc:h2:mem:
test
;
driver-class-name: org.h2.Driver
driver-class-name: org.h2.Driver
logging:
logging:
level:
level:
${pub.getPKGCodeName()}: debug
${pub.getPKGCodeName()}: debug
\ No newline at end of file
\ No newline at end of file
SLN/pom.xml.ftl
已删除
100644 → 0
浏览文件 @
d5876551
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<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>
<artifactId>${sys.codeName}</artifactId>
<groupId>${pub.getPKGCodeName()}</groupId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>${pub.getCodeName()?lower_case}-srv</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
</parent>
<properties>
<mybatis-plus.version>3.0.6</mybatis-plus.version>
<junit.version>4.12</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${r'${junit.version}'}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录