File tree Expand file tree Collapse file tree
test/java/demo/codeexample Expand file tree Collapse file tree Original file line number Diff line number Diff line change 133133 <groupId >org.springframework.modulith</groupId >
134134 <artifactId >spring-modulith-starter-jpa</artifactId >
135135 </dependency >
136+ <dependency >
137+ <groupId >com.h2database</groupId >
138+ <artifactId >h2</artifactId >
139+ <scope >test</scope >
140+ </dependency >
141+
142+ <dependency >
143+ <groupId >com.h2database</groupId >
144+ <artifactId >h2</artifactId >
145+ <scope >runtime</scope >
146+ </dependency >
147+
136148 </dependencies >
137149
138150 <build >
Original file line number Diff line number Diff line change 1+ spring.datasource.url =jdbc:h2:mem:testdb
2+ spring.datasource.driverClassName =org.h2.Driver
3+ spring.datasource.username =sa
4+ spring.datasource.password =
5+ spring.jpa.database-platform =org.hibernate.dialect.H2Dialect
6+ spring.jpa.hibernate.ddl-auto =create-drop
Original file line number Diff line number Diff line change 22
33import org .junit .jupiter .api .Test ;
44import org .springframework .boot .test .context .SpringBootTest ;
5+ import org .springframework .test .context .ActiveProfiles ;
56
67@ SpringBootTest
8+ @ ActiveProfiles ("test" )
79class CodeExampleApplicationTests {
810
911 @ Test
You can’t perform that action at this time.
0 commit comments