Easily develop web applications with STS and Spring Boot. In 10 minutes.

Here are some simple steps for the title.

element

procedure

STS installation

Download and install the latest version of STS from here. https://spring.io/tools

Create Starter Project

Click Create new Spring Starter Project, specify "Type" as "Gradle (Buildship 3.x)" and click Next.

Select the following.

(Some of them are not used this time, but I always check the ones I use)

スクリーンショット 2019-12-23 5.42.05.png Finish。

Implementation

Create a controller. In Package Explorer, right-click com.example.demo under src / main / java, click New> Class, and Finish with a Name of "TopController". スクリーンショット 2019-12-23 5.49.14.png

Create a view. In Package Explorer, right-click templates under src / main / resources, click New> File, and Finish with a Name of "top.html". スクリーンショット 2019-12-23 5.53.33.png

Start up, check display

For simplicity, open build.gradle and comment out the dependencies that need to be set instead of using it this time. スクリーンショット 2019-12-23 6.41.36.png Don't forget to right-click on the project and launch Reflesh Gradle Project.

スクリーンショット 2019-12-23 6.34.44.png

in conclusion

In recent years, programming languages have become popular and obsolete, but Java is a statically typed language, so it is easy to refactor, and it is suitable for large-scale development (more than 10 years from the initial development, it is a rough system with only small-scale maintenance), Android Kotlin is also appearing for this, and it is still very popular all over the world.

On the other hand, I think that there are many people who are not good at using Java because it is strict and redundant, but this can be solved by using a library like Lombok or FW like Spring Boot. Mostly.

In this article, I briefly introduced how to build a simple development environment for Spring Boot, which can be said to be the standard in the Java world. I hope it will give you an opportunity to experience this opportunity.

Recommended Posts

Easily develop web applications with STS and Spring Boot. In 10 minutes.
[Java] Sample project for developing web applications with Spring Boot
Compare Hello, world! In Spring Boot with Java, Kotlin and Groovy
HTTPS with Spring Boot and Let's Encrypt
Start web application development with Spring Boot
Run WEB application with Spring Boot + Thymeleaf
SameSite cookie in Spring Boot (Spring Web MVC + Tomcat)
Test controller with Mock MVC in Spring Boot
Asynchronous processing with regular execution in Spring Boot
Run Scala applications with Spring Boot through Gradle
Output request and response log in Spring Boot
Create a web api server with spring boot
Include external jar in package with Spring boot2 + Maven3
Try using DI container with Laravel and Spring Boot
Switch environment with Spring Boot application.properties and @Profile annotation
Spring Security usage memo: Cooperation with Spring MVC and Boot
Spring Boot with Spring Security Filter settings and addictive points
SSO with GitHub OAuth in Spring Boot 1.5.x environment
Security in web applications
Until you start development with Spring Boot in eclipse 1
Until you start development with Spring Boot in eclipse 2
Attempt to SSR Vue.js with Spring Boot and GraalJS
Database environment construction with Docker in Spring boot (IntellJ)
Connect Spring Boot and Angular type-safely with OpenAPI Generator
Download with Spring Boot
Handle Java 8 date and time API with Thymeleaf with Spring Boot
Implement REST API with Spring Boot and JPA (Application Layer)
Implement REST API with Spring Boot and JPA (Infrastructure layer)
Until INSERT and SELECT to Postgres with Spring boot and thymeleaf
Sample web application that handles multiple databases in Spring Boot 1.5
How to call and use API in Java (Spring Boot)
Easily get any metrics with Spring Boot + Micrometer + Prometheus Exporter
Get error information using DefaultErrorAttributes and ErrorAttributeOptions in Spring Boot 2.3
Connect to database with spring boot + spring jpa and CRUD operation
Use thymeleaf3 with parent without specifying spring-boot-starter-parent in Spring Boot
Implement REST API with Spring Boot and JPA (domain layer)
Domain Driven Development with Java and Spring Boot ~ Layers and Modules ~
Set context-param in Spring Boot
Generate barcode with Spring Boot
Hello World with Spring Boot
Implement GraphQL with Spring Boot
Get started with Spring boot
Hello World with Spring Boot!
Spring Boot 2 multi-project in Gradle
[Spring Boot] Web application creation
Run LIFF with Spring Boot
SNS login with Spring Boot
File upload with Spring Boot
Spring Boot starting with copy
Spring Boot starting with Docker
Hello World with Spring Boot
Set cookies with Spring Boot
Use Spring JDBC with Spring Boot
Major changes in Spring Boot 1.5
Add module with Spring Boot
Getting Started with Spring Boot
NoHttpResponseException in Spring Boot + WireMock
Create microservices with Spring Boot
Send email with spring boot
Implement a simple Web REST API server with Spring Boot + MySQL
Let's make a book management web application with Spring Boot part1