Applied Eclipse code formatter
This commit is contained in:
+9
-18
@@ -9,26 +9,17 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@SpringBootApplication
|
||||
@RestController
|
||||
public class ConfigClient {
|
||||
@SpringBootApplication @RestController public class ConfigClient {
|
||||
|
||||
@Value("${user.role}")
|
||||
private String role;
|
||||
@Value("${user.role}") private String role;
|
||||
|
||||
@Value("${user.password}")
|
||||
private String password;
|
||||
@Value("${user.password}") private String password;
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ConfigClient.class, args);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ConfigClient.class, args);
|
||||
}
|
||||
|
||||
@RequestMapping(
|
||||
value = "/whoami/{username}",
|
||||
method = RequestMethod.GET,
|
||||
produces = MediaType.TEXT_PLAIN_VALUE
|
||||
)
|
||||
public String whoami(@PathVariable("username") String username) {
|
||||
return String.format("Hello %s! You are a(n) %s and your password is '%s'.\n", username, role, password);
|
||||
}
|
||||
@RequestMapping(value = "/whoami/{username}", method = RequestMethod.GET, produces = MediaType.TEXT_PLAIN_VALUE) public String whoami(@PathVariable("username") String username) {
|
||||
return String.format("Hello %s! You are a(n) %s and your password is '%s'.\n", username, role, password);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-7
@@ -6,13 +6,9 @@ import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = ConfigClient.class)
|
||||
@WebAppConfiguration
|
||||
public class ConfigClientTests {
|
||||
@RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = ConfigClient.class) @WebAppConfiguration public class ConfigClientTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
@Test public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user