1. Open the IDEA, click + Create New Project
2. Locate and click on the Spring Initializr, click on the next menu on the left.
Note that this idea https://start.spring.io default template provided online, so it is necessary to ensure smooth network.
3. Modify the project name, Maven Project (the project build tool), click next.
4. Add dependent
Select a category from the left, and then check in the middle of the window needs to rely on. On the right you can see the dependencies you have selected.
You can also select the top right drop-down version of Spring Boot. Click Next when finished.
Creating infrastructure projects, do not rely on a lot of the election, web one is enough
5. Set the Project Name / engineering directory
Setting the project name Project name and path to save the project Project location. When finished, click Finish.
6. Wait IDEA building project
7. Establish a good project structure
8. write a hello world, to see the project can not start
@RestController
@SpringBootApplication
public class AlonApplication {
public static void main(String[] args) {
SpringApplication.run(AlonApplication.class, args);
}
@RequestMapping()
public String hello(){
return "hello spring boot \n 谢谢阅读!";
}
}