How to embed HSQLDB in file with Spring to a WebApp

后端 未结 3 1674
猫巷女王i
猫巷女王i 2021-01-03 16:15

I have a webApp with Spring and it works correctly when I use HSQLDB in server mode, but in file mode, it only passes the unit test. This is my data source:

         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-03 16:25

    I found the answer here:

    http://coding.derkeiler.com/Archive/Java/comp.lang.java.databases/2003-11/0096.html

    I put de data inside in a jar on my project persistenceLayerWithData.jar.

    Then I set this propety to the datasource:

    
    

    And I added the jar to the web-inf/lib and make the war (all this with maven) and deploy in tomcat and it works, also I deploy it in websphere 7 and also works.

    But when I run whit mvn jetty:run it doesn't I suppose that when running jetty whit maven it doesn't put the jar in the claspath.

提交回复
热议问题