How to use JUnit tests with Spring Roo? (Problems with EntityManager)

后端 未结 7 517
忘了有多久
忘了有多久 2021-01-02 19:40

I\'m trying to write a JUnit test for a Spring Roo project. If my test requires use of the entity classes, I get the following Exception:

java.lang.IllegalS         


        
相关标签:
7条回答
  • 2021-01-02 20:42

    I was also running into the same exception and everything was configured correctly. I removed the project and reimported it again in STS (SpringSource Tool Suite) and this problem went away.

    Not sure why this fixed it but this issue could have been caused by use of Eclipse to manage the Roo generated project before switching to STS in my case.

    0 讨论(0)
提交回复
热议问题