mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-05 17:38:06 +08:00
Add bootVersion to home page
This commit is contained in:
parent
92f3e343b6
commit
76e7f3f15c
@ -59,5 +59,5 @@ before running `cf push`.
|
||||
|
||||
Alternatively you can jar up the app and make it executable in any environment. Care is needed with the includes and excludes:
|
||||
|
||||
$ spring jar --include '+templates/*.groovy,+spring/**' --exclude '-**/*.groovy,-**/*.jar,start.jar' start.jar app.groovy
|
||||
$ spring jar --include '+spring/**' --exclude '-**/*.jar,start.jar' start.jar app.groovy
|
||||
$ cf push -p start.jar -p start.jar -n start
|
||||
|
@ -269,6 +269,7 @@ class Projects {
|
||||
List<Packaging> packagings
|
||||
List<JavaVersion> javaVersions
|
||||
List<Language> languages
|
||||
List<BootVersion> bootVersions
|
||||
static class Language {
|
||||
String name
|
||||
String value
|
||||
@ -289,4 +290,8 @@ class Projects {
|
||||
String value
|
||||
boolean selected
|
||||
}
|
||||
static class BootVersion {
|
||||
String value
|
||||
boolean selected
|
||||
}
|
||||
}
|
@ -94,3 +94,10 @@ projects:
|
||||
- name: Java
|
||||
value: java
|
||||
selected: true
|
||||
bootVersions:
|
||||
- value: 1.1.2.BUILD-SNAPSHOT
|
||||
selected: false
|
||||
- value: 1.1.1.RELEASE
|
||||
selected: true
|
||||
- value: 1.0.2.RELEASE
|
||||
selected: false
|
||||
|
@ -70,6 +70,12 @@
|
||||
<input type="radio" name="language" value="${it.value}"${it.selected==true ? ' checked="true"' : ''}/>
|
||||
${it.name}
|
||||
</label><% } %>
|
||||
<label>Spring Boot Version:</label>
|
||||
<% bootVersions.each { %>
|
||||
<label class="radio">
|
||||
<input type="radio" name="bootVersion" value="${it.value}"${it.selected==true ? ' checked="true"' : ''}/>
|
||||
${it.name}
|
||||
</label><% } %>
|
||||
<button type="submit" class="btn">Generate</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -53,6 +53,12 @@ class IntegrationTests {
|
||||
assertTrue('Wrong body:\n' + body, body.contains('name="style" value="web"'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void homeHasBootVersion() {
|
||||
String body = home()
|
||||
assertTrue('Wrong body:\n' + body, body.contains('name="bootVersion" value="1'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void downloadStarter() {
|
||||
byte[] body = new TestRestTemplate().getForObject('http://localhost:' + port + 'starter.zip', byte[])
|
||||
|
Loading…
Reference in New Issue
Block a user