Practice from Spring in Action fifth edition.
Building Spring projects with Lombok often requires additional settings or the compilation may fail. If the compilation failed, Try these tips:
- Configure the annotation processor for IntellJ to compile. See Configuring Annotation Processing.
- Check the the lombok plugin is installed.
- Check if there's latest lombok release. If you use maven, remove the lombok directory under your
.m2/Repository/projectlombok/
directory and build again.
- Handling web requests
- Defining the view
- Testing the controller
- Creating a controller class
- Displaying information in the view
- Validating form input
- Working with JDBC template via
Repository
- Defining a RDBMS schema and preloading the data.
- Inserting data with Simple JDBC Insert
- User information customization using
@Entity
. - Create an user repository to store user information by extending
CrudRepository
. - Write a
@Service
as a user repository service by implementingUserDetailsService
, which looks up users in the user repository. - Configure the security options by extending
WebSecurityConfigurerAdapter
- Usage example of the prevention of Cross-Site Request Forgery(CSRF).
- Configure a data source, using MySQL as an example.
- Configure logging (
WARN
,INFO
,DEBUG
, etc.) - Define profile-specific properties.
- REST Controller
- Enabling Hyperlinks
- Use Spring Data REST to enable data-backend service.