mirror of
https://gitee.com/dcren/initializr.git
synced 2025-05-12 00:28:07 +08:00
Add version to pom and gradle build
This commit is contained in:
parent
9ed3be9ba9
commit
50f95ccf94
@ -10,6 +10,9 @@ class MainController {
|
||||
@Value('${info.home:http://localhost:8080/}')
|
||||
private String home
|
||||
|
||||
@Value('${info.spring-boot.version:1.0.0.RELEASE}')
|
||||
private String bootVersion
|
||||
|
||||
@Value('${TMPDIR:.}')
|
||||
private String tmpdir
|
||||
|
||||
@ -116,6 +119,7 @@ class MainController {
|
||||
@RequestMapping("/pom")
|
||||
@ResponseBody
|
||||
ResponseEntity<byte[]> pom(PomRequest request, Map model) {
|
||||
model.bootVersion = bootVersion
|
||||
new ResponseEntity<byte[]>(render("starter-pom.xml", request, model), ["Content-Type":"application/octet-stream"] as HttpHeaders, HttpStatus.OK)
|
||||
|
||||
}
|
||||
@ -123,6 +127,7 @@ class MainController {
|
||||
@RequestMapping("/build")
|
||||
@ResponseBody
|
||||
ResponseEntity<byte[]> gradle(PomRequest request, Map model) {
|
||||
model.bootVersion = bootVersion
|
||||
new ResponseEntity<byte[]>(render("starter-build.gradle", request, model), ["Content-Type":"application/octet-stream"] as HttpHeaders, HttpStatus.OK)
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
buildscript {
|
||||
ext {
|
||||
springBootVersion = '1.0.0.BUILD-SNAPSHOT'
|
||||
springBootVersion = '${bootVersion}'
|
||||
}
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
@ -13,7 +13,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.0.0.BUILD-SNAPSHOT</version>
|
||||
<version>${bootVersion}</version>
|
||||
</parent>
|
||||
|
||||
<dependencies><% styles.each { %>
|
||||
|
Loading…
Reference in New Issue
Block a user