Upgrade to spring-javaformat 0.0.11
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* * Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,8 +41,7 @@ public class MyController {
|
||||
sessionVar = new Date();
|
||||
session.setAttribute("var", sessionVar);
|
||||
}
|
||||
ModelMap model = new ModelMap("message", Message.MESSAGE)
|
||||
.addAttribute("sessionVar", sessionVar);
|
||||
ModelMap model = new ModelMap("message", Message.MESSAGE).addAttribute("sessionVar", sessionVar);
|
||||
return new ModelAndView("hello", model);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* * Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,24 +46,21 @@ public class SampleDevToolsApplicationIntegrationTests {
|
||||
|
||||
@Test
|
||||
public void testStaticResource() throws Exception {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.getForEntity("/css/application.css", String.class);
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/css/application.css", String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
assertThat(entity.getBody()).contains("color: green;");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPublicResource() throws Exception {
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/public.txt",
|
||||
String.class);
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/public.txt", String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
assertThat(entity.getBody()).contains("public file");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClassResource() throws Exception {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.getForEntity("/application.properties", String.class);
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application.properties", String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user