For checking the Lingotek translation Spanish
Spring Boot
is an opinionated framework built on top of the Spring Framework
. You can find out more about the Spring framework and its modules in our Spring tutorial.
Spring typical requires a lot of configuration. Spring Boot simplifies this setup by providing defaults for many features. You can still adjust the defaults according to your needs.
Spring Boot is mostly used to create web applications but can also be used for command line applications. A Spring Boot web application can be built to a stand-alone JAR. This JAR contains an embedded web server that can be started with java -jar
. Spring Boot provides selected groups of auto configured features and dependencies, which makes it faster to get started.
Thymeleaf
Thymeleaf is a powerful template processing engine for the Spring framework.
Spring Boot Devtools
The Spring Boot Devtools provides an ensemble of very useful tools that enhance the development experience a lot. Such as Automatic recompiling upon saving and much more.
Spring Data JPA
Spring Data JPA makes it easy to implement JPA based repositories and build Spring-powered applications that use data access technologies.
Since we have the dev-tools
dependency added to the project we can use it’s live-reload
functionality. Without any further configuration it reloads the application every time you save a file in the project.
Change the "Hello, World!" in your HelloWorldController class to something else. Save and press reload in your web browser. The message returned by the web application should have changed.
Since we use the dependency dev-tools
of the SpringBoot framework the server already recompiled the code for us. We only need to refresh the page. If you navigate to localhost:8080/issuereport you should see the text issuereport_form
.
The values of the fields email
, url
, description
, markedAsPrivate
and updates
will be coming from the form the user submitted. The others will be generated on creation or when the report is updated.
To let Spring instantiate the Issue
object from the submitted html form we have to implement getters
and setters
, as Spring expects a valid Java Bean and won’t use reflection to set the fields. To automatically generate them Right Click
in the source code window of the IssueReport
class. Then select the Source
sub-menu; from that menu selecting Generate Getters and Setters
will cause a wizard window to appear. Select all fields and select the