For my own study.
--Image of a tool for standardizing and optimizing various library and middleware combinations --Eliminate the complexity of the Spring Framework configuration file as much as possible so that you can develop and launch apps with a few settings. --Not equal to Spring Framework --Spring Framework is the basis of Spring projects ([DI: Dependency Injection], [AOP: Aspect Oriented Programming], etc.) --Spring Framwork has increased the number of projects according to needs (Spring Batch, Spring Data, etc.) ――I think that many people use it as "Spring" = "Spring Framework" --Spring Framework defines settings in basic XML and creates an external file --Recently, the style of writing settings in the Java source itself rather than XML is the mainstream? ――When it comes to a large service, the configuration file becomes bloated and it seems to be quite difficult. --Web container can be included in jar --It seems that it can be provided in the form of including Tomcat --It is also possible to export the war file as and put it on a normal server. --Spring Boot manages the settings and library dependencies that realize the target system as a "definition set (Starter)". ――I use Maven and Gradle as before, but the image that the setting file is prepared so that I do not have to set it myself --There are officially many Starters. OK if you customize it according to your purpose --It seems that the Bean definition is automatically defined by the mechanism of AutoConfigure. --Many things can be achieved with annotations -[?] Can it be used with pure Spring? --When realizing AutoConfigure It seems to use "@AutoConfigureAfter, @AutoConfigureBefore, @AutoConfigureOrder" etc.
--It is common to use STS (Spring Tool Suite). Is it easy? --For STS Japanese localization, you can use the Pleiades Japanese localization plug-in that translates Eclipse into Japanese. ――It looks good to put a plug-in in Eclipse and develop it!
--I'm going to use Maven --Tools similar to Ant and Gradle -[?] I see "Spring Boot is fine with Maven", but I don't know the reason. --Like make when building C language --Maben build settings are in "pom.xml"
Prerequisite environment Windows 10 64bit
Pleiades All in One Download http://mergedoc.osdn.jp/ With a new one
Environment variable settings [Reference] https://www.javadrive.jp/start/install/index4.html This time I will use Java 8 from Pleiades Addendum) I did not think deeply and even set environment variables, but I'm glad I didn't do this time.
Put the necessary plug-ins in Eclipse It may not be necessary if you use STS, but since it is based on Eclipse, I will install a plug-in Search for "STS" in [Help]> [Eclipse Marketplace]
Create a project [File]> [New]> [Others]> Spring Starter Project Service URL "https://start.spring.io" Name "spring boot demo" Type "Maven" Packaging "jar" Java version "8" Language "Java" Group "com.bootsample" Deliverable "spring boot demo" Version "0.0.1-SNAPSHOT" ← Default Description: "Spring Boot Sample Project" Package "com.springbootdemo" ↓ After pressing [Next]
Build configuration Right click on the project and do the following ・ Maven → Project update → OK ・ Execute → Maven install (It will be installed ...
Creating a controller Right click on the package "com.springbootdemo" [New]> [Class] Create a new class
Start up Right click on the project Click [Run]> [Spring Boot App] Application starts http://localhost:8080/ When you access, you should see the following
So far for the time being.
Recommended Posts