Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e4fe293

Browse files
2 parents 2b07482 + 420986d commit e4fe293

File tree

1 file changed

+16
-140
lines changed
  • 6.refreshing-configurations/config-server

1 file changed

+16
-140
lines changed
Lines changed: 16 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,48 @@
1-
# Centralized Configuration using github
1+
# Refreshing 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>"
37+
"connstring": "{cipher}5eeefc741591596005ddd38168830ea5001d082a470e1d1dbc2e9634c7f8453221230fc135819b077de8df37040facc9c9b294d5ffdb05c7170484159e69f9d1bdad70c7768635df1a1d8f67fa57ed1e"
7038
}
7139
}
7240
]
7341
}
7442
```
75-
----------------
76-
- After adding more granular paths for perf
77-
78-
application.yml
7943

80-
```yml
81-
server:
82-
port: 8888
44+
GET -> `http://localhost:8080/actuator/refresh`
8345

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*
46+
<img width="910" alt="Screenshot 2022年06月05日 at 1 15 42 PM" src="https://user-images.githubusercontent.com/54174687/172040831-d3d7de57-a962-4df7-8bfd-febef7254bb2.png">
9347

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-
```
10948

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"
136-
}
137-
}
138-
]
139-
}
140-
```
141-
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-
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /