File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
java/org/squidmin/java/spring/maven/cloudsql/actuator Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 111111 <optional >true</optional >
112112 </dependency >
113113
114+ <dependency >
115+ <groupId >com.h2database</groupId >
116+ <artifactId >h2</artifactId >
117+ <scope >test</scope >
118+ </dependency >
114119 <dependency >
115120 <groupId >org.springframework.boot</groupId >
116121 <artifactId >spring-boot-starter-test</artifactId >
Original file line number Diff line number Diff line change 1313 webEnvironment = SpringBootTest .WebEnvironment .RANDOM_PORT ,
1414 properties = {
1515 "management.endpoints.web.exposure.include=health,info" ,
16- // show details so JSON has components (optional)
17- "management.endpoint.health.show-details=always"
16+ "management.endpoint.health.show-details=always" ,
17+ "spring.datasource.url=jdbc:h2:mem:testdb;MODE=PostgreSQL;DB_CLOSE_DELAY=-1" ,
18+ "spring.datasource.driver-class-name=org.h2.Driver" ,
19+ "spring.jpa.hibernate.ddl-auto=none"
1820 }
1921)
2022public class ActuatorTest {
Original file line number Diff line number Diff line change 11spring :
22 application :
33 name : google-cloud-sql
4+ datasource :
5+ url : jdbc:postgresql://127.0.0.1:5400/jm_demo_db
6+ username : username
7+ password : ${DB_PASSWORD:password}
8+ driver-class-name : org.postgresql.Driver
9+ hikari :
10+ maximum-pool-size : 10
11+ minimum-idle : 2
12+
13+ jpa :
14+ open-in-view : false
15+ hibernate :
16+ ddl-auto : none
17+ properties :
18+ hibernate.dialect : org.hibernate.dialect.PostgreSQLDialect
You can’t perform that action at this time.
0 commit comments