Search code examples
spring-bootcoding-stylestandardsjava-package

package convention for java Springboot lightweight controllers?


We have the controllers already being used with many apis in the package

com.mycomp.myapp.controllers

The controllers developed are heavy, so planning to add light weight apis with minimum request parameters.

confused between these two com.mycomp.myapp.controllers.lite or com.mycomp.myapp.lite.controllers

Can anyone suggest the package names with conventions?


Solution

  • I think you should go with com.mycomp.myapp.controllers.lite. Because actually you are creating controllers only and now controllers would be distinguished by light or heavyweight. That's why the distinguishing part should be inside the controller package.

    Happy coding :)