I will be making a list of intermediate to advanced interview questions, then listing their answers here.
- What is the difference between Spring and Spring Boot?
- How would you connect a database to Spring Boot?
- How do we persist/retrieve data with Spring Boot?
Here are my answers!
- Spring Framework is a great place to build all sorts of applications, but to build them rapidly as production-ready applications requires Spring Boot. Spring requires numerous configurations and other choices to be made during the app development process, but Spring Boot makes it much quicker with its autoconfiguration setting default choices for these config options. Along with other fundamental principles such as inversion of control, the user is able to speedily create needed apps with little effort!
- Create a database with a username and password, insert tables and values into your database, then create your application.yml file. In this file, specify your database’s URL, username, and password.
- We add JPA 2 and Hibernate to our project. Add required annotated entity we want persisted and add an id. Create a repository, then finally create a service class to use the repository.
