Skip to content

Commit 2f4c584

Browse files
authored
Update readme.md
1 parent fb18312 commit 2f4c584

File tree

1 file changed

+15
-143
lines changed
  • 5.encrypting-decrypting-configurations/config-server

1 file changed

+15
-143
lines changed
+15-143
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,44 @@
1-
# Centralized Configuration using github
1+
# Encrypting and Decrypting Configurations
22

3-
GET -> `http://localhost:8888/s1rates/default/main`
3+
CURL
44

5-
```json
6-
{
7-
"name": "s1rates",
8-
"profiles": [
9-
"default"
10-
],
11-
"label": "main",
12-
"version": "29ab92d02e1e4aed70efe8eaee73472747797235",
13-
"state": null,
14-
"propertySources": [
15-
{
16-
"name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/station1/s1rates.properties",
17-
"source": {
18-
"rate": "1.91",
19-
"lanecount": "1"
20-
}
21-
},
22-
{
23-
"name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/s1rates.properties",
24-
"source": {
25-
"rate": "1.91",
26-
"lanecount": "1"
27-
}
28-
},
29-
{
30-
"name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/application.properties",
31-
"source": {
32-
"rate": "1.55",
33-
"tollstart": "05:00",
34-
"tollstop": "22:00",
35-
"lanecount": "0",
36-
"invalid.connstring": "<n/a>"
37-
}
38-
}
39-
]
40-
}
5+
```sh
6+
curl --location --request GET 'http://localhost:8888/s1rates/default/main' \
7+
--header 'Authorization: Basic cHJhdGVlazpwcmF0ZWVr' \
8+
--header 'Cookie: JSESSIONID=478DA3869AC127A8DBC6A86B025D8BB4'
419
```
4210

43-
GET -> `http://localhost:8888/s2rates/default/main`
11+
Response:
4412

4513
```json
4614
{
47-
"name": "s2rates",
15+
"name": "s1rates",
4816
"profiles": [
4917
"default"
5018
],
5119
"label": "main",
52-
"version": "0b09e2f2ca026806afd9ab1c86114ad032fa0d79",
20+
"version": "f1b7f6ac9109f3a74212156bfa854f238be5540e",
5321
"state": null,
5422
"propertySources": [
5523
{
56-
"name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/station2/s2rates.properties",
24+
"name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-2/station1/s1rates.properties",
5725
"source": {
58-
"rate": "1.65",
59-
"lanecount": "3"
26+
"rate": "2.91",
27+
"lanecount": "1"
6028
}
6129
},
6230
{
63-
"name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/application.properties",
31+
"name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-2/application.properties",
6432
"source": {
6533
"rate": "1.55",
6634
"tollstart": "05:00",
6735
"tollstop": "22:00",
6836
"lanecount": "0",
69-
"invalid.connstring": "<n/a>"
70-
}
71-
}
72-
]
73-
}
74-
```
75-
----------------
76-
- After adding more granular paths for perf
77-
78-
application.yml
79-
80-
```yml
81-
server:
82-
port: 8888
83-
84-
#spring:
85-
# cloud:
86-
# config:
87-
# server:
88-
# git:
89-
# uri: https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls
90-
# default-label: main
91-
# search-paths:
92-
# - station*
93-
94-
spring:
95-
cloud:
96-
config:
97-
server:
98-
git:
99-
uri: https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-2
100-
search-paths:
101-
- station*
102-
repos:
103-
perf:
104-
pattern: '*/perf'
105-
uri: https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2
106-
search-paths:
107-
- 'station*'
108-
```
109-
110-
GET -> `http://localhost:8888/s1rates/perf/main`
111-
112-
```json
113-
{
114-
"name": "s1rates",
115-
"profiles": [
116-
"perf"
117-
],
118-
"label": "main",
119-
"version": "e9ede2065766443f11b7331d5e6a482b04f38746",
120-
"state": null,
121-
"propertySources": [
122-
{
123-
"name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/station1/s1rates.properties",
124-
"source": {
125-
"rate": "5",
126-
"lanecount": "5"
127-
}
128-
},
129-
{
130-
"name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/application.properties",
131-
"source": {
132-
"rate": "1.55",
133-
"tollstart": "05:00",
134-
"tollstop": "22:00",
135-
"lanecount": "0"
37+
"connstring": "{cipher}5eeefc741591596005ddd38168830ea5001d082a470e1d1dbc2e9634c7f8453221230fc135819b077de8df37040facc9c9b294d5ffdb05c7170484159e69f9d1bdad70c7768635df1a1d8f67fa57ed1e"
13638
}
13739
}
13840
]
13941
}
14042
```
14143

142-
GET -> http://localhost:8888/s3rates/perf/main
143-
144-
```json
145-
{
146-
"name": "s3rates",
147-
"profiles": [
148-
"perf"
149-
],
150-
"label": "main",
151-
"version": "e9ede2065766443f11b7331d5e6a482b04f38746",
152-
"state": null,
153-
"propertySources": [
154-
{
155-
"name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/station3/s3rates.properties",
156-
"source": {
157-
"rate": "9.10",
158-
"lanecount": "8"
159-
}
160-
},
161-
{
162-
"name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/application.properties",
163-
"source": {
164-
"rate": "1.55",
165-
"tollstart": "05:00",
166-
"tollstop": "22:00",
167-
"lanecount": "0"
168-
}
169-
}
170-
]
171-
}
172-
```
44+
![Screenshot 2022-06-05 at 11 34 11 AM](https://user-images.githubusercontent.com/54174687/172037650-ae5b66f8-ee17-4537-95ed-d6a6ca6c2d2e.png)

0 commit comments

Comments
 (0)