gs-accessing-data-jpa
gs-accessing-data-jpa copied to clipboard
Accessing Data with JPA article needs improvements
The startup guide at Accessing Data with JPA requires some improvements. For example, there is no place for this paragraph in the write-up:
Normally you would add @EnableWebMvc for a Spring MVC app, but Spring Boot adds it automatically when it sees spring-webmvc on the classpath. This flags the application as a web application and activates key behaviors such as setting up a DispatcherServlet.
This is because that write-up is not about serving HTTP requests. It has nothing to do with serving content to the user. And there is no Spring boot starter web dependency on the classpath of the article.
Instead, it should be replaced with something like this:
Spring boot application will automatically enable @EnableJpaRepositories if it finds spring-boot-starter-data-mongodb on the classpath.
Something like that.