JPA Entity is defined with @Entity annotation to represent a table in your database, this is the User entity to represent an user with credentials.
This is our UserRepository to find a user in a dabatabase by username and save a new user.
Finally we are going to create a default user in our database with encrypted password, in order to do that we are going to implement ApplicationReadyEvent in a Bootstrap class, that’s it, when Spring Boot is up and running we are going to verify if a default user exist in our database otherwise is going to create it.
Do not forget to create your application.properties file, so you can specify your local database credentials there.