Spring and JPA versions in Labkey 15.1?

LabKey Support Forum (Inactive)
Spring and JPA versions in Labkey 15.1? cyrus  2015-04-27 12:37
Status: Closed
 
LabKey folks,

I'm a LabKey noob, but I've spent a few weeks getting familiar with and building an application in vanilla Spring. As I look to start migrating my application into LabKey as a module, I'm fuzzy about how the pieces fit together.

Right now, when I run my application in vanilla Spring, the database gets dropped, recreated and repopulated with some dummy data in my Application file, which is exactly what I want during development. The database tables are created entirely by JPA annotations (@Entity, @OneToMany, etc) and I've never had to touch any Spring xml files since I use Spring Boot. So a few questions already:

1. What version of Spring and JPA does LabKey 15.1 use?

2. Does LabKey 15.1 use Spring security or does it have its own custom access control layer?

3. Does LabKey 15.1 support Spring Boot out-of-the-box? If not, can it be added? If so, how? (Otherwise, I'll need XML files, in which case, where should those reside in my LabKey module?)

4. Will a LabKey module have an "application.properties" file as a Spring Boot application does? If so, where should it reside? If not, where are these vital settings instead?

My Spring boot application.properties file, for example:
>>>>
spring.datasource.url=jdbc:postgresql://localhost:5432/refcig
spring.datasource.username=postgres
spring.datasource.password=sasa
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.show-sql=true
http.mappers.jsonPrettyPrint=true
multipart.maxFileSize: 512KB
multipart.maxRequestSize: 512KB
spring.view.prefix=/WEB-INF/jsp/
spring.view.suffix=.jsp
server.contextPath=
>>>>

5. Will LabKey be able to drop my db tables and reconstruct them from either annotation or XML file configurations each time LabKey is restarted, like vanilla Spring does? If not, what's the suggested development method? Create and manipulate tables manually as needed?

I think with some of these basics covered, I'll be better equipped to dive in to LabKey. Thanks in advance for any help.
 
 
jeckels responded:  2015-04-28 11:29
Hello,

Welcome to LabKey Server!

1. We're currently using Spring 2.5.5, including Spring Mock and Spring WebMVC. We're not using JPA.

2. We have our own access control layer.

3. We aren't using Spring Boot. I'm not very familiar with it, but at a glance it doesn't look like it would work with LabKey Server as-is.

4. We don't use an application.properties file. We store similar settings, including the JDBC connection information and context path, in our Tomcat deployment descriptor. https://www.labkey.org/wiki/home/Documentation/page.view?name=cpasxml

5. We have a well-defined approach for creating and upgrading schemas and tables, which uses actual SQL scripts. This is the same mechanism we use on our development machines and to upgrade production servers. https://www.labkey.org/wiki/home/Documentation/page.view?name=sqlScripts

Thanks,
Josh
 
jeckels responded:  2015-05-08 13:09
As an update, we've just upgraded to Spring 4.0.X for our upcoming 15.2 release.

Thanks,
Josh