The server-side code is situated in the Java and resources folder under src/main, as seen in the preceding screenshot. The folder structure is as follows:
Server-side source code
You may notice that the Spring components do not use the traditional @Autowired or @Inject annotations for dependency injection in the generated code. This is because we use constructor injection instead of field injection, and Spring Boot doesn't need explicit annotations for constructor injection. Constructor injection is considered better as it enables us to write better unit tests and avoids design issues, whereas field injection is more elegant but easily makes ...
Get Full Stack Development with JHipster 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.