From 710a94b2c331ddaacaf0a734320845311eaa2847 Mon Sep 17 00:00:00 2001 From: e563186 Date: Wed, 8 Jan 2025 09:26:51 +0100 Subject: [PATCH] fix(springbootlabs): fixed annotations and properties on integration test section --- content/en/labs/java/spring/01_Spring.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/en/labs/java/spring/01_Spring.md b/content/en/labs/java/spring/01_Spring.md index 15ec81b14..98758faff 100644 --- a/content/en/labs/java/spring/01_Spring.md +++ b/content/en/labs/java/spring/01_Spring.md @@ -1107,7 +1107,7 @@ spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password=password -spring.datasource.platform=h2 +spring.sql.init.platform=h2 spring.jpa.hibernate.ddl-auto=update ``` @@ -1119,8 +1119,10 @@ spring: url: jdbc:h2:mem:testdb username: sa password: password - platform: h2 driver-class-name: org.h2.Driver + sql: + init: + platform: h2 jpa: hibernate: ddl-auto: update @@ -1156,7 +1158,7 @@ Integrationstests sind wichtig, um sicherzustellen, dass verschiedene Komponente @SpringBootTest @AutoConfigureMockMvc @ActiveProfiles("admin") -@ExtendWith(SpringExtension.class) +@TestPropertySource("/application-test.properties") public class AdminControllerIntegrationTest { @Autowired