Languages
[Edit]
EN

Spring Boot + Spring Data JPA + H2 - unit tests simple example - @DataJpaTest

4 points
Created by:
Root-ssh
178180

Full and tested example of how to use Spring Boot + Spring Data JPA + H2 when writing unit tests.

Github repository with this example:

Download this example:

Project structure:

UserEntity.java

UserRepository.java

Application.java

application.properties

data-h2.sql

schema-h2.sql

UserRepositoryTest.java

 

    1
    Donate to Dirask
    Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
    Join to our subscribers to be up to date with content, news and offers.

    Spring Boot

    Native Advertising
    🚀
    Get your tech brand or product in front of software developers.
    For more information Contact us
    Dirask - we help you to
    solve coding problems.
    Ask question.

    ❤️💻 🙂

    Join