提交 9be8ddfa 编写于 作者: zhouweidong's avatar zhouweidong

SpringBoot入门示例测试

上级 28a150b5
...@@ -12,30 +12,14 @@ TARGET=PSSYSTEM ...@@ -12,30 +12,14 @@ TARGET=PSSYSTEM
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version> <version>2.0.1.RELEASE</version>
</parent> </parent>
<properties>
<junit.version>4.12</junit.version>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${r'${junit.version}'}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
package ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.domain;
import lombok.Data;
import java.sql.Timestamp;
/**
* 实体[${item.codeName}] 数据对象
*/
@Data
public class ${item.codeName}{
<#list item.getPSDEFields() as defield>
private ${srfjavatype(defield.stdDataType)} ${defield.codeName?lower_case};
</#list>
}
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
package ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.service;
import ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.domain.${item.codeName};
/**
* 实体[${item.codeName}] 服务对象接口
*/
public interface ${item.codeName}Service{
<#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
<#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}.domain.${item.codeName};
import ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.service.${item.codeName}Service;
/**
* 实体[${item.codeName}] 服务对象接口实现
*/
@Service
public class ${item.codeName}ServiceImpl implements ${item.codeName}Service{
<#if item.getAllPSDEActions()??>
<#list item.getAllPSDEActions() as deaction>
<#if (deaction.getActionMode() == "READ") ><#comment>Get与自定义行为返回DoMain不发带major</#comment>
@Override
public ${item.codeName} ${srfmethodname(deaction.getCodeName())}(${item.codeName} et){
System.out.println(String.format("您当前正在调用[%s]的[%s]方法","${item.codeName}ServiceImpl","${srfmethodname(deaction.getCodeName())}"));
return et;
}
<#else>
@Override
public boolean ${srfmethodname(deaction.getCodeName())}(${item.codeName} et){
System.out.println(String.format("您当前正在调用[%s]的[%s]方法","${item.codeName}ServiceImpl","${srfmethodname(deaction.getCodeName())}"));
return true;
}
</#if>
</#list>
</#if>
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
server:
port: 8080
servlet:
contextPath: /
spring:
datasource:
username: test
password: 'test'
url: jdbc:h2:mem:test;
driver-class-name: org.h2.Driver
logging:
level:
${pub.getPKGCodeName()}: debug
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册