|
1 |
| -# Centralized Configuration using github |
| 1 | +# Encrypting and Decrypting Configurations |
2 | 2 |
|
3 |
| -GET -> `http://localhost:8888/s1rates/default/main` |
| 3 | +CURL |
4 | 4 |
|
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' |
41 | 9 | ```
|
42 | 10 |
|
43 |
| -GET -> `http://localhost:8888/s2rates/default/main` |
| 11 | +Response: |
44 | 12 |
|
45 | 13 | ```json
|
46 | 14 | {
|
47 |
| - "name": "s2rates", |
| 15 | + "name": "s1rates", |
48 | 16 | "profiles": [
|
49 | 17 | "default"
|
50 | 18 | ],
|
51 | 19 | "label": "main",
|
52 |
| - "version": "0b09e2f2ca026806afd9ab1c86114ad032fa0d79", |
| 20 | + "version": "f1b7f6ac9109f3a74212156bfa854f238be5540e", |
53 | 21 | "state": null,
|
54 | 22 | "propertySources": [
|
55 | 23 | {
|
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", |
57 | 25 | "source": {
|
58 |
| - "rate": "1.65", |
59 |
| - "lanecount": "3" |
| 26 | + "rate": "2.91", |
| 27 | + "lanecount": "1" |
60 | 28 | }
|
61 | 29 | },
|
62 | 30 | {
|
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", |
64 | 32 | "source": {
|
65 | 33 | "rate": "1.55",
|
66 | 34 | "tollstart": "05:00",
|
67 | 35 | "tollstop": "22:00",
|
68 | 36 | "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" |
136 | 38 | }
|
137 | 39 | }
|
138 | 40 | ]
|
139 | 41 | }
|
140 | 42 | ```
|
141 | 43 |
|
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 | + |
0 commit comments