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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.