Web application and REST service development of MVC.
spring
Advocating micro-service architecture, there have been some valuable discussions in Weibo recently, such as here and here. Micro-service architecture advocates splitting functions into discrete services and deploying them independently. spring
Boot can easily package applications into independent and runnable JAR packages, so it fits this concept very well in the development mode. At present, spring
Boot is still a milestone version of 0.5.0, so the related documents are not perfect. This paper will introduce the development process based on this project through a simple example.
Want spring
Boot needs to use Gradle or Maven as a building tool for functional development. In this example, we will use Eclipse and Maven plug-ins for development. Use a spring
Boot, first create a Maven project, and modify the main configuration file pom.xml of Maven, as shown in the following figure:
& ltparent & gt
& ltgroupId & gtorg . spring framework . boot & lt; /groupId & gt;
& ltartifactId & gt Spring-Start-Start-Parents & lt/artifactid >
& lt version & gt0.5.0.M7 < /version & gt;
& lt/parent & gt;
& lt dependency & gt
& lt dependency & gt
& ltgroupId & gtorg . spring framework . boot & lt; /groupId & gt;
& ltartifactId & gtspring-boot-starter-web & lt; /artifact id & gt;
& lt/dependency & gt;
& lt dependency & gt
& ltgroupId & gtorg.thymeleaf & lt/groupId & gt;
& ltartifactId & gt Thyme Leaves-Spring & lt/artifactid >
& lt/dependency & gt;
& lt/dependencies & gt;
& lt attribute & gt
& ltstart-class & gt; com . Levin . application & lt; /start-class & gt;
& lt/properties & gt;
& lt build & gt
& lt plug-in & gt
& lt plug-in & gt
& ltgroupId & gtorg . spring framework . boot & lt; /groupId & gt;
& ltartifactId & gtspring-boot-maven-plugin</artifact id & gt;
& lt/plugin & gt;
& lt/plugins & gt;
& lt/build & gt;
& lt repository & gt
& lt knowledge base & gt
& lt/id & gt; Spring-Milestone & lt/id >