JUnit tests pass in Eclipse but fail in Maven Surefire

前端 未结 17 2010
臣服心动
臣服心动 2020-11-29 17:28

I have written some JUnit tests using JUnit 4 and spring-test libraries. When I run the tests inside Eclipse then run fine and pass. But when I run them using Maven (during

17条回答
  •  囚心锁ツ
    2020-11-29 17:43

    You don't need to inject a DataSource in the JpaTransactionManager since the EntityManagerFactory already has a datasource. Try the following:

    
       
    
    

提交回复
热议问题