mirror of
https://gitee.com/dcren/initializr.git
synced 2026-02-25 21:22:58 +08:00
Fix bug in webStyle detection for zip
This commit is contained in:
@@ -144,7 +144,7 @@ class MainController {
|
||||
resources.mkdirs()
|
||||
new File(resources, 'application.properties').write('')
|
||||
|
||||
if (isWebStyle(request.style)) {
|
||||
if (request.style.any { isWebStyle(it) }) {
|
||||
new File(dir, 'src/main/resources/templates').mkdirs()
|
||||
new File(dir, 'src/main/resources/static').mkdirs()
|
||||
}
|
||||
@@ -212,7 +212,7 @@ class MainController {
|
||||
}
|
||||
|
||||
private boolean isWebStyle(String style) {
|
||||
return style.contains('web') || style.contains('thymeleaf') || style.contains('freemarker') || style.contains('velocity') || style.contains('groovy-template')
|
||||
style.contains('web') || style.contains('thymeleaf') || style.contains('freemarker') || style.contains('velocity') || style.contains('groovy-template')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,13 @@ class IntegrationTests {
|
||||
assertTrue(body.length>100)
|
||||
}
|
||||
|
||||
@Test
|
||||
void installer() {
|
||||
ResponseEntity<String> response = new TestRestTemplate().getForEntity('http://localhost:' + port + 'install.sh', String)
|
||||
assertEquals(HttpStatus.OK, response.getStatusCode())
|
||||
assertNotNull(response.body)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// CLI compiled classes are not @ComponentScannable so we have to create
|
||||
|
||||
Reference in New Issue
Block a user