I am studying a Spring book and they mention Java domain model.
What is that?
Michael Borgwardt's answer "A domain model (the term is not at all Java specific) is a class" is wrong. I am very surprised so many agree with that answer.
A domain model is all the classes that model the behavior of the solution. It is the minimum necessary to accomplish the required behavior. The domain model is free of UI and persistence functionality (unless the problem revolves around UI or persistence).
I have seen domain model implemented in one class but that is not the design of an object-oriented solution. In an object-oriented domain model, each concept has its own class that implements the behavior required of that concept and contains the necessary fields to maintain the state of the class.