[JAVA] Until "Hello World" with Spring Boot

For my own study.

What is Spring Boot?

--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.

About the development environment

--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!

Build tool

--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"

I'm finally starting manufacturing

  1. Prerequisite environment Windows 10 64bit

  2. Pleiades All in One Download http://mergedoc.osdn.jp/ With a new one

  3. 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.

  4. 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] EclipseでSTS.PNG

  5. 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] 新規Springプロジェクト依存関係.PNG

  6. Build configuration Right click on the project and do the following ・ Maven → Project update → OK ・ Execute → Maven install (It will be installed ...

  7. Creating a controller Right click on the package "com.springbootdemo" [New]> [Class] Create a new class コントローラーの作成.PNG とりあえずコントローラー.PNG

  8. 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 ブラウザの表示.PNG

So far for the time being.

Recommended Posts

Until "Hello World" with Spring Boot
Hello World with Spring Boot
Hello World with Spring Boot!
Hello World with Spring Boot
(Intellij) Hello World with Spring Boot
Hello World with Eclipse + Spring Boot + Maven
(IntelliJ + gradle) Hello World with Spring Boot
Hello world! With Spring Boot (Marven + text editor)
[Java] Hello World with Java 14 x Spring Boot 2.3 x JUnit 5 ~
Spring Boot Hello World in Eclipse
Hello World (REST API) with Apache Camel + Spring Boot 2
Hello World (console app) with Apache Camel + Spring Boot 2
[Practice! ] Display Hello World in Spring Boot
How Spring Security works with Hello World
Hello World with Micronaut
Download with Spring Boot
Compare Hello, world! In Spring Boot with Java, Kotlin and Groovy
Until data acquisition with Spring Boot + MyBatis + PostgreSQL
Try to display hello world with spring + gradle
Spring Boot2 Web application development with Visual Studio Code Hello World creation
Generate barcode with Spring Boot
Implement GraphQL with Spring Boot
Run LIFF with Spring Boot
SNS login with Spring Boot
Hello World with VS Code!
File upload with Spring Boot
Spring Boot starting with copy
Spring Boot starting with Docker
Set cookies with Spring Boot
Use Spring JDBC with Spring Boot
Add module with Spring Boot
Getting Started with Spring Boot
Create microservices with Spring Boot
Send email with spring boot
Hello World with SpringBoot / Gradle
Hello, World! With Asakusa Framework!
Create Restapi with Spring Boot ((1) Until Run of App)
Until you start development with Spring Boot in eclipse 1
Until you start development with Spring Boot in eclipse 2
Hello World comparison between Spark Framework and Spring Boot
Use Basic Authentication with Spring Boot
gRPC on Spring Boot with grpc-spring-boot-starter
Create an app with Spring Boot 2
Hot deploy with Spring Boot development
Database linkage with doma2 (Spring boot)
Spring Boot programming with VS Code
Inquiry application creation with Spring Boot
Hello world with Kotlin and JavaFX
Hello World with Docker and C
Get validation results with Spring Boot
Create a Hello World web app with Spring framework + Jetty
Until INSERT and SELECT to Postgres with Spring boot and thymeleaf
Create an app with Spring Boot
Google Cloud Platform with Spring Boot 2.0.0
Flow until output table data to view with Spring Boot
Check date correlation with Spring Boot
Hello World with GlassFish 5.1 + Servlet + JSP
Create PDF with itext7 ~ Hello World ~
I tried GraphQL with Spring Boot
[Java] LINE integration with Spring Boot
Beginning with Spring Boot 0. Use Spring CLI