mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Add test to check class resources aren't exposed
Closes gh-7880
This commit is contained in:
parent
6bc37c0589
commit
21bfe52694
@ -60,4 +60,11 @@ public class SampleDevToolsApplicationIntegrationTests {
|
||||
assertThat(entity.getBody()).contains("public file");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClassResource() throws Exception {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.getForEntity("/application.properties", String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user