Spring configuration for embedded H2 database for tests

后端 未结 4 2290
忘了有多久
忘了有多久 2020-12-02 07:04

What does your Spring configuration for integration tests look like using an embedded h2 datasource and, optionally, JUnit?

My first try with a SingleConnectionDataS

4条回答
  •  情书的邮戳
    2020-12-02 08:06

    I think it's best to use your production DataSource implementation (only with different connection-string) for the unit-tests.

    Anyway "failed on more complicated tests" doesn't give enough information for a more detailed answer.

    (Self-ad : check this)

提交回复
热议问题