mirror of
https://gitee.com/dcren/initializr.git
synced 2025-09-20 02:29:44 +08:00
Add bootVersion to home page
This commit is contained in:
@@ -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:
|
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
|
$ cf push -p start.jar -p start.jar -n start
|
||||||
|
@@ -269,6 +269,7 @@ class Projects {
|
|||||||
List<Packaging> packagings
|
List<Packaging> packagings
|
||||||
List<JavaVersion> javaVersions
|
List<JavaVersion> javaVersions
|
||||||
List<Language> languages
|
List<Language> languages
|
||||||
|
List<BootVersion> bootVersions
|
||||||
static class Language {
|
static class Language {
|
||||||
String name
|
String name
|
||||||
String value
|
String value
|
||||||
@@ -289,4 +290,8 @@ class Projects {
|
|||||||
String value
|
String value
|
||||||
boolean selected
|
boolean selected
|
||||||
}
|
}
|
||||||
|
static class BootVersion {
|
||||||
|
String value
|
||||||
|
boolean selected
|
||||||
|
}
|
||||||
}
|
}
|
@@ -94,3 +94,10 @@ projects:
|
|||||||
- name: Java
|
- name: Java
|
||||||
value: java
|
value: java
|
||||||
selected: true
|
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"' : ''}/>
|
<input type="radio" name="language" value="${it.value}"${it.selected==true ? ' checked="true"' : ''}/>
|
||||||
${it.name}
|
${it.name}
|
||||||
</label><% } %>
|
</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>
|
<button type="submit" class="btn">Generate</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -53,6 +53,12 @@ class IntegrationTests {
|
|||||||
assertTrue('Wrong body:\n' + body, body.contains('name="style" value="web"'))
|
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
|
@Test
|
||||||
void downloadStarter() {
|
void downloadStarter() {
|
||||||
byte[] body = new TestRestTemplate().getForObject('http://localhost:' + port + 'starter.zip', byte[])
|
byte[] body = new TestRestTemplate().getForObject('http://localhost:' + port + 'starter.zip', byte[])
|
||||||
|
Reference in New Issue
Block a user