Naming rules
Modules
Modules' names for common-util
, common-pojo
, integration-test
are static. Project name is provided by user. For microservice two modules are created: one with interfaces and one with implementation. Respectively interfaces module is created by adding sufix -interfaces
to microservice name and implementation module is created by adding sufix -implementation
to microservice name. With seperate directory for every microservice it is creating structure where directory with microservice name has inside directories named interfaces
and implementation
but with longer names for modules. This way strcuture is kept clean and clear. Remember that for servlet microservices only implementation module is created.
+ example [example]
+ common-pojo [common-pojo]
+ common-util [common-util]
+ data-native
+ interfaces [data-native-interfaces]
+ implementation [data-native-implementation]
+ portal-servlet
+ implementation [portal-servlet-implementation]
+ integration-test [integration-test]
Classes
Configuration
Names of generated configuration classes also depends on microservice name they are created for:
- Spring configuration class - microservice name is camelized and sufix
SpringConfiguration
is added. - JLupin configuration class - microservice name is camelized and sufix
JLupinConfiguration
is added.
Example:
Microservice name: portal
Spring configuration file: PortalSpringConfiguration
JLupin configuration file: PortalJLupinConfiguration
Bean
Bean classes are created into proper package ([groupId].bean.interfaces
nad [groupId].bean.impl
) and with generated name:
- interface - camelized name provided for Bean with
Bean
sufix - implementation - camelized name provided for Bean with
BeanImpl
sufix
Annotation @Bean
is added to implementation class with camelized (first letter downcased) name provided for bean.
Example:
Bean name: Exchange
Interface class: ExchangeBean
Implementation class: ExchangeBeanImpl
Spring bean name: exchangeBean
DAO
DAO classes are created into proper package ([groupId].dao.interfaces
nad [groupId].dao.impl
) and with generated name:
- interface - camelized name provided for DAO with
DAO
sufix - implementation - camelized name provided for DAO with
DAOImpl
sufix
Annotation @DAO
is added to implementation class with camelized (first letter downcased) name provided for DAO.
Example:
DAO name: Exchange
Interface class: ExchangeDAO
Implementation class: ExchangeDAOImpl
Spring bean name: exchangeDAO
Service
Service classes are created into proper package ([groupId].service.interfaces
nad [groupId].service.impl
) and with generated name:
- interface - camelized name provided for service with
Service
sufix - implementation - camelized name provided for service with
ServiceImpl
sufix
Annotation @Service
is added to implementation class with camelized (first letter downcased) name provided for service.
Example:
Service name: Exchange
Interface class: ExchangeService
Implementation class: ExchangeServiceImpl
Spring bean name: exchangeService
Integration test class
Integration test class is also automatically generated with name compound of camelized microservice name and sufix "Test".
Example:
Microservice name: portal
Test class: PortalTest