[forge-dev] Approach to Spring Boot handling JPA

Ivan St. Ivanov ivan.st.ivanov at gmail.com
Sun Jul 26 16:52:19 EDT 2015


Hi folks,

As some of you probably heard, in Bulgarian JUG we are going to adopt an
addon (as George put it a couple of months ago). Beginning of August we are
going to develop a Forge extension for Spring Boot. One of the things that
we are not sure yet how to tackle is persistence.

You see, Spring supports JPA. However instead of configuring it in the Java
EE way with persistence.xml, in Spring Boot they use a properties file for
that (and for all their configuration). The current JPA facet
implementations however are developed with presistence.xml in mind. The JPA
setup wizard itself is also bound somehow to presistence.xml - it picks the
facet to install based on that file.

What we want to do is not to rewrite all the Forge commands for JPA just
because of the fact above. We were thinking of a small change - extend
JPAFacet with SpringBootJPAFacet. And then add a new implementation of
PersistenceContainer -> SpringBootContainer or something? And then we have
to change JPASetupWizardImpl to pick the facet not only based on the JPA
version, but also based on the container.

Or maybe there is a better way?

I am expecting your feedback :)

Cheers,
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20150726/17bdf84b/attachment.html 


More information about the forge-dev mailing list