mirror of
https://gitee.com/dcren/initializr.git
synced 2025-05-07 14:18:09 +08:00
Updates for new cf gem
This commit is contained in:
parent
6018dd74be
commit
15e9c110e1
15
app.groovy
15
app.groovy
@ -1,6 +1,6 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
@Grab("org.springframework.boot:spring-boot-starter-actuator:0.5.0.M1")
|
@Grab("org.springframework.boot:spring-boot-starter-actuator:0.5.0.BUILD-SNAPSHOT")
|
||||||
@Grab("org.codehaus.groovy:groovy-ant:2.1.6")
|
@Grab("org.codehaus.groovy:groovy-ant:2.1.6")
|
||||||
@Grab("org.codehaus.groovy.modules.http-builder:http-builder:0.5.2")
|
@Grab("org.codehaus.groovy.modules.http-builder:http-builder:0.5.2")
|
||||||
@Grab(group='net.sf.json-lib', module='json-lib', version='2.3', classifier='jdk15')
|
@Grab(group='net.sf.json-lib', module='json-lib', version='2.3', classifier='jdk15')
|
||||||
@ -72,14 +72,15 @@ class MainController {
|
|||||||
log.info("Creating: " + download)
|
log.info("Creating: " + download)
|
||||||
tempFiles << download
|
tempFiles << download
|
||||||
|
|
||||||
reactor.notify("tempfiles", Event.wrap(tempFiles))
|
|
||||||
|
|
||||||
new AntBuilder().zip(destfile: download) {
|
new AntBuilder().zip(destfile: download) {
|
||||||
zipfileset(dir:dir, includes:"**")
|
zipfileset(dir:dir, includes:"**")
|
||||||
}
|
}
|
||||||
log.info("Downloading: " + download)
|
log.info("Downloading: " + download)
|
||||||
new ResponseEntity<byte[]>(download.bytes, ["Content-Type":"application/zip"] as HttpHeaders, HttpStatus.OK)
|
def result = new ResponseEntity<byte[]>(download.bytes, ["Content-Type":"application/zip"] as HttpHeaders, HttpStatus.OK)
|
||||||
|
|
||||||
|
reactor.notify("tempfiles", Event.wrap(tempFiles))
|
||||||
|
|
||||||
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/pom")
|
@RequestMapping("/pom")
|
||||||
@ -136,7 +137,7 @@ class TemporaryFileCleaner {
|
|||||||
@PostConstruct
|
@PostConstruct
|
||||||
void init() {
|
void init() {
|
||||||
reactor.on(Selectors.$("tempfiles"), [
|
reactor.on(Selectors.$("tempfiles"), [
|
||||||
accept: {
|
accept: { event ->
|
||||||
def tempFiles = event.data
|
def tempFiles = event.data
|
||||||
log.info "Tempfiles: " + tempFiles
|
log.info "Tempfiles: " + tempFiles
|
||||||
if (tempFiles) {
|
if (tempFiles) {
|
||||||
@ -168,6 +169,6 @@ class PomRequest {
|
|||||||
artifactId == null ? name : artifactId
|
artifactId == null ? name : artifactId
|
||||||
}
|
}
|
||||||
String getPackageName() {
|
String getPackageName() {
|
||||||
packageName == null ? name : packageName
|
packageName == null ? name.replace('-', '.') : packageName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@ applications:
|
|||||||
- name: initializr
|
- name: initializr
|
||||||
memory: 1024M
|
memory: 1024M
|
||||||
instances: 1
|
instances: 1
|
||||||
url: initializr.cfapps.io
|
host: initializr
|
||||||
|
domain: cfapps.io
|
||||||
path: .
|
path: .
|
||||||
command: java -jar ./spring/lib/*.jar run --cp . --local app.groovy -- --server.port=$PORT
|
command: java -jar ./spring/lib/*.jar run --cp . --local app.groovy -- --server.port=$PORT
|
||||||
# buildpack: https://github.com/dsyer/cloudfoundry-buildpack-java
|
# buildpack: https://github.com/dsyer/cloudfoundry-buildpack-java
|
||||||
|
Loading…
Reference in New Issue
Block a user