File tree Expand file tree Collapse file tree
java/org/baeldung/spring/cloud/vaultsample
java/org/baeldung/spring/cloud/vaultsample Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 2929
3030 <dependencies >
3131
32- <dependency >
33- <groupId >org.springframework.boot</groupId >
34- <artifactId >spring-boot-starter-data-rest</artifactId >
35- </dependency >
3632
37- <dependency >
38- <groupId >org.springframework.boot</groupId >
39- <artifactId >spring-boot-starter-data-jpa</artifactId >
40- </dependency >
4133
4234
4335 <dependency >
4436 <groupId >org.springframework.cloud</groupId >
4537 <artifactId >spring-cloud-starter-vault-config</artifactId >
4638 </dependency >
4739
40+ <dependency >
41+ <groupId >org.springframework.cloud</groupId >
42+ <artifactId >spring-cloud-vault-config-databases</artifactId >
43+ </dependency >
44+
4845 <dependency >
4946 <groupId >org.springframework.boot</groupId >
5047 <artifactId >spring-boot-starter-test</artifactId >
5956 </dependency >
6057
6158
59+ <dependency >
60+ <groupId >org.springframework.boot</groupId >
61+ <artifactId >spring-boot-starter-jdbc</artifactId >
62+ </dependency >
6263 </dependencies >
6364
6465 <dependencyManagement >
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 77 config :
88 order : -10
99
10- token : b93d1b0d-15b5-f69e-d311-352a65fa7bc8
1110 ssl :
1211 trust-store : classpath:/vault.jks
1312 trust-store-password : changeit
@@ -17,13 +16,14 @@ spring:
1716 application-name : fakebank
1817
1918 kv :
20- enabled : true
19+ enabled : false
2120 backend : kv
2221 application-name : fakebank
2322
2423 database :
2524 enabled : true
2625 role : fakebank-accounts-rw
26+ # backend: database
2727# username-property: spring.datasource.username
2828# password-property: spring.datasource.password
2929
Original file line number Diff line number Diff line change 1414import org .springframework .boot .test .context .SpringBootTest ;
1515import org .springframework .core .env .Environment ;
1616import org .springframework .test .context .junit4 .SpringRunner ;
17- import org .springframework .vault .annotation .VaultPropertySource ;
1817
1918@ RunWith (SpringRunner .class )
2019@ SpringBootTest
@@ -26,11 +25,12 @@ public class VaultSampleApplicationLiveTest {
2625 @ Autowired
2726 DataSource datasource ;
2827
28+
2929 @ Test
3030 public void whenGenericBackendEnabled_thenEnvHasAccessToVaultSecrets () {
3131
3232 String fooValue = env .getProperty ("foo" );
33- assertEquals ("bar" , fooValue );
33+ assertEquals ("test- bar" , fooValue );
3434
3535 }
3636
Original file line number Diff line number Diff line change 1- # spring.cloud.vault.token=b93d1b0d-15b5-f69e-d311-352a65fa7bc8
1+ spring.cloud.vault.token =b93d1b0d-15b5-f69e-d311-352a65fa7bc8
22
33logging.level.org.springframework =INFO
You can’t perform that action at this time.
0 commit comments