|
|
|
@ -125,24 +125,22 @@ calls `SpringApplication` and add `@EnableAutoConfiguration`, e.g:
|
|
|
|
|
|
|
|
|
|
```java
|
|
|
|
|
import org.springframework.boot.*;
|
|
|
|
|
import org.springframework.boot.autoconfiguration.*;
|
|
|
|
|
import org.springframework.boot.autoconfigure.*;
|
|
|
|
|
import org.springframework.stereotype.*;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
|
@EnableAutoConfiguration
|
|
|
|
|
public class SampleController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
String home() {
|
|
|
|
|
return "Hello World!"
|
|
|
|
|
return "Hello World!";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
|
SpringApplication.run(SampleController.class, args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|