@@ -23,124 +23,10 @@ docker-compose up
2323```
2424
2525### Test And Verify:
26- #### 1. Config : [ http://localhost:9000/user-service/dev ] ( http://localhost:9000/user-service/dev )
27- #### 2. Eureka-dashbord : [ http://localhost:9001/ ] ( http://localhost:9001/ )
28- ![ ] ( doc/images/eureka-admin.png )
26+
27+ [ detail] (doc/1.Test And Verify.md)
2928
30- ``` bash
31- $curl -s -H " Accept:application/json" http://localhost:9001/eureka/apps | jq ' .applications.application[] | {service: .name, ip: .instance[].ipAddr, prot: .instance[].port."$"}'
32- ```
33-
34- ``` json
35- {
36- "service" : " TURBINE-DASHBORD" ,
37- "ip" : " 172.18.0.10" ,
38- "prot" : 9010
39- }
40- {
41- "service" : " TRADE-SERVICE" ,
42- "ip" : " 172.18.0.8" ,
43- "prot" : 9007
44- }
45- {
46- "service" : " API-GATEWAY" ,
47- "ip" : " 172.18.0.11" ,
48- "prot" : 9006
49- }
50- {
51- "service" : " SERVICE-EXT" ,
52- "ip" : " 172.18.0.9" ,
53- "prot" : 9005
54- }
55- {
56- "service" : " ZIPKIN-UI" ,
57- "ip" : " 172.18.0.6" ,
58- "prot" : 9012
59- }
60- {
61- "service" : " CONFIG-SERVER" ,
62- "ip" : " 172.18.0.5" ,
63- "prot" : 9000
64- }
65- {
66- "service" : " USER-SERVICE" ,
67- "ip" : " 172.18.0.7" ,
68- "prot" : 9002
69- }
70- ```
71- #### 3. Turbine-dashbord : [ http://localhost:9010/hystrix ] ( http://localhost:9010/hystrix )
72-
73- ![ ] (doc/images/Hystrix Dashboard.png)
74- Paste url [ http://localhost:9010/turbine.stream ] ( http://localhost:9010/turbine.stream ) in Hystrix Dashboard, and moniter stream.
75- ![ ] (doc/images/Hystrix Stream turbine.png)
76-
77-
78- #### 4. Zipkin UI
79-
80- http://localhost:9012
81- ![ ] ( doc/images/zipkin01.png )
82- ![ ] ( doc/images/zipkin02.png )
83-
84- #### 5. Get token and test api
85-
86- With ` implicit grant ` , sikp code grant. Use the following URL in a web browser
87-
88-
89- [ http://localhost:9006/oauth/authorize?client_id=client&secret_id=secret&response_type=token&redirect_uri=http://localhost ] ( http://localhost:9006/oauth/authorize?client_id=client&secret_id=secret&response_type=token&redirect_uri=http://localhost )
90-
91- Login(` user ` /` password ` ), and redirect to a URL like:
92-
93- ```
94- http://localhost:9006/#
95- access_token=92fd0e5f-4dba-44cd-b199-7fe1aae5a300
96- &token_type=bearer
97- &expires_in=43180
98- &scope=app
99-
100- ```
101-
102- ` TOKEN = 92fd0e5f-4dba-44cd-b199-7fe1aae5a300 `
103-
104-
105- ``` bash
106- $ curl -s http://localhost:9006/ext/user\? id\= 1\& token\= sy\& access_token\= 92fd0e5f-4dba-44cd-b199-7fe1aae5a300 | jq .
107- ```
108-
109- ``` json
110- {
111- "id" : 1 ,
112- "loginName" : " erdaoya" ,
113- "nickName" : " erdaoya" ,
114- "password" : " 1234" ,
115- "mobile" : " 12345678909" ,
116- "email" : " xx@gmail.com" ,
117- "gender" : 0 ,
118- "registerTime" : 2017 ,
119- }
120- ```
121- ``` bash
122- curl -s http://localhost:9006/user/persionalInfo\? id\= 1\& token\= sy\& access_token\= 92fd0e5f-4dba-44cd-b199-7fe1aae5a300 | jq .
123- ```
124- ``` json
125- {
126- "id" : 1 ,
127- "loginName" : " erdaoya" ,
128- "nickName" : " erdaoya" ,
129- "password" : " 1234" ,
130- "mobile" : " 12345678909" ,
131- "email" : " xx@gmail.com" ,
132- "gender" : 0 ,
133- "registerTime" : 2017 ,
134- "updateTime" : null
135- }
136- ```
13729
138- #### 5. Admin
139-
140- [ http://localhost:9003/ ] ( http://localhost:9003/ )
141- ![ ] ( doc/images/admin01.png )
142- ![ ] ( doc/images/admin02.png )
143- ![ ] ( doc/images/admin03.png )
14430
14531## Architecture
14632![ ] ( doc/images/MicroService.png )
0 commit comments