In Spring Boot - Too Many Public Classes?

Can I take a spring boot MVC CRUD app and

  1. lower the number of public classes?
    1. As a way to enforce rules like only services should call * classes.
    2. And @Entity classes should only be used by services and * classes.

This idea comes from Spring Office Hours - Episode 43

I want to give it a spin and put some notes in this blog post.

Also, what do you think of the two rules above? Should services only use services? Should @Entity classes only be used by a service to interact with the database via the * classes?

Tags: spring, spring-boot, java

← Back home