Add a command that enables Spring Data JPA. This means several things:
- Add dependencies to Spring Data JPA in pom.xml
- Ask for the DB provider and add its driver as dependency as well
- Add in the Spring Boot descriptor the data source settings, which are again specific for every DB provider
Forge core already contains an enum with all the possible DB vendors (org.jboss.forge.addon.javaee.jpa.DatabaseType).
The work with the Spring Boot properties file is encapsulated in SpringBootDescriptor. It may have several implementation based on the format. As a beginning, the addon should provide only properties file implementation. Its job concerning this issue is to encapsulate the adding and retrieving the data source information.
The job should be done by SpringBootJPAFacetImpl. Its install method should add the dependencies, while its saveConfig method should save the settings in the spring boot descriptor. The other facet of the project (SpringBootFacet) should load and construct the descriptor itself.
This command should be only available if spring boot facet is installed
Add a command that enables Spring Data JPA. This means several things:
Forge core already contains an enum with all the possible DB vendors (org.jboss.forge.addon.javaee.jpa.DatabaseType).
The work with the Spring Boot properties file is encapsulated in SpringBootDescriptor. It may have several implementation based on the format. As a beginning, the addon should provide only properties file implementation. Its job concerning this issue is to encapsulate the adding and retrieving the data source information.
The job should be done by SpringBootJPAFacetImpl. Its install method should add the dependencies, while its saveConfig method should save the settings in the spring boot descriptor. The other facet of the project (SpringBootFacet) should load and construct the descriptor itself.
This command should be only available if spring boot facet is installed