自动化部署打包测试

This commit is contained in:
筱锋xiao_lfeng 2024-01-24 17:20:59 +08:00
parent 2bf1768e08
commit 232899e4c3
Signed by: XiaoLFeng
GPG Key ID: F693AA12AABBFA87
3 changed files with 30 additions and 1 deletions

19
pom.xml
View File

@ -148,6 +148,25 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<name>buildDate</name>
<pattern>yyyy-MM-dd HH:mm:ss</pattern>
<locale>en_US</locale>
<timeZone>GMT+8</timeZone>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>

View File

@ -3,18 +3,26 @@ package com.jsl.oa.controllers;
import com.jsl.oa.utils.BaseResponse;
import com.jsl.oa.utils.ResultUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/**
* @author xiaofeng
*/
@Slf4j
@RestController
public class IndexController {
@Value("${maven.timestamp}")
private String timestamp;
@RequestMapping("/")
public BaseResponse index() {
log.info("请求接口[GET]: /");
return ResultUtil.success("欢迎使用JSL-OA系统服务器处于正常状态");
HashMap<String, String> newMap = new HashMap<>();
newMap.put("timestamp", "构建时间:" + timestamp);
return ResultUtil.success("欢迎使用JSL-OA系统服务器处于正常状态", newMap);
}
}

View File

@ -1,3 +1,5 @@
maven:
timestamp: @buildDate@
spring:
profiles:
active: @profile.active@