Fix bug in webStyle detection for zip

This commit is contained in:
Dave Syer
2014-05-30 11:12:43 +01:00
parent 009dcdcc4a
commit 8413c40c16
2 changed files with 9 additions and 2 deletions

View File

@@ -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')
}
}

View File

@@ -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