自动化部署打包测试
This commit is contained in:
parent
2bf1768e08
commit
232899e4c3
19
pom.xml
19
pom.xml
|
@ -148,6 +148,25 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
|
|
|
@ -3,18 +3,26 @@ package com.jsl.oa.controllers;
|
||||||
import com.jsl.oa.utils.BaseResponse;
|
import com.jsl.oa.utils.BaseResponse;
|
||||||
import com.jsl.oa.utils.ResultUtil;
|
import com.jsl.oa.utils.ResultUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xiaofeng
|
* @author xiaofeng
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
public class IndexController {
|
public class IndexController {
|
||||||
|
@Value("${maven.timestamp}")
|
||||||
|
private String timestamp;
|
||||||
|
|
||||||
@RequestMapping("/")
|
@RequestMapping("/")
|
||||||
public BaseResponse index() {
|
public BaseResponse index() {
|
||||||
log.info("请求接口[GET]: /");
|
log.info("请求接口[GET]: /");
|
||||||
return ResultUtil.success("欢迎使用JSL-OA系统,服务器处于正常状态");
|
HashMap<String, String> newMap = new HashMap<>();
|
||||||
|
newMap.put("timestamp", "构建时间:" + timestamp);
|
||||||
|
return ResultUtil.success("欢迎使用JSL-OA系统,服务器处于正常状态", newMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
maven:
|
||||||
|
timestamp: @buildDate@
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: @profile.active@
|
active: @profile.active@
|
Loading…
Reference in New Issue
Block a user