DTO, service, and pagination options

JDL also allows us to declare entity-related options easily. Refer to https://www.jhipster.tech/jdl/options for more details. The options that are currently supported are as follows:

  • service: By default, JHipster generates REST resource classes that call the entity repositories directly. This is the simplest option, but in real-world scenarios, we might need a service layer to handle business logic. This option lets us create a service layer with a simple Spring service bean class or with a traditional interface and implementation for the service bean. Possible values are serviceClass and serviceImpl. Choosing the latter will create an interface and implementation, which is preferred by some people.

Get Full Stack Development with JHipster - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.