What is the recommended project structure for spring boot rest projects?

前端 未结 9 1699
迷失自我
迷失自我 2020-12-07 09:29

I\'m a beginner with spring boot. I\'m involved in the beginning of a project where we would build rest services using spring boot. Could you please advise the recommended d

9条回答
  •  悲哀的现实
    2020-12-07 10:04

    Though this question has an accepted answer, still I would like to share my project structure for RESTful services.

    src/main/java
        +- com
            +- example
                +- Application.java
                +- ApplicationConstants.java
                    +- configuration
                    |   +- ApplicationConfiguration.java
                    +- controller
                    |   +- ApplicationController.java
                    +- dao
                    |   +- impl
                    |   |   +- ApplicationDaoImpl.java
                    |   +- ApplicationDao.java
                    +- dto
                    |   +- ApplicationDto.java
                    +- service
                    |   +- impl
                    |   |   +- ApplicationServiceImpl.java
                    |   +- ApplicationService.java
                    +- util
                    |   +- ApplicationUtils.java
                    +- validation
                    |   +- impl
                    |   |   +- ApplicationValidationImpl.java
                    |   +- ApplicationValidation.java
    

    DAO = Data Access Object.
    DTO = Data Transfer Object.

提交回复
热议问题