Skip to content

a09090443/Micro-Service

Repository files navigation

JDK Spring Spring Boot Build License

Micro-Services Project

TODO LIST

How to start each service

  1. Install maven in operator system.
  2. using maven command to compile project.
    • change to root directory (Micro-Service)
    • execute maven command:mvn package -Dmaven.test.skip=true
  3. after compile and you will find jar file in each project target directory, e.g.,
    • oauth-server:jar file in oauth-server/target
  4. you have to follow start sequence:
    1. eureka-server:java -jar ./eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar
    2. config-server:java -jar ./config-server/target/config-server-0.0.1-SNAPSHOT.jar
    3. oauth-server:java -jar ./oauth-server/target/oauth-server-0.0.1-SNAPSHOT.jar
    4. resource-api-jdbc-server:java -jar ./resource-api-jdbc-server/target/oauth-jdbc-client-0.0.1-SNAPSHOT.jar
    5. resource-api-jwt-server:java -jar ./resource-api-jwt-server/target/oauth-jwt-client-0.0.1-SNAPSHOT.jar
    6. oauth-sso:java -jar ./oauth-sso/target/oauth-sso-0.0.1-SNAPSHOT.jar
    7. oauth-web:java -jar ./oauth-web/target/oauth-web-0.0.1-SNAPSHOT.jar
    8. zuul-server:java -jar ./zuul-server/target/zuul-server-0.0.1-SNAPSHOT.jar

Services list


Server name Comment port
config-server Cloud config server 8000
eureka-server Discovery and register service center 8001
oauth-server Securing access server 8002
resource-api-jdbc-server Provider RESTFul API via JDBC access 8010
resource-api-jwt-server Provider RESTFul API via JWT access 8011
loadbalance-1 Load balance server 1 8012
loadbalance-2 Load balance server 2 8013
oauth-sso Admin manage system 8080
oauth-web Admin manage system 8081
zuul-server Gateway server 8090
hystrix-dashboard Hystrix monitor server 8100
hystrix-feign Hystrix Feign Server 8101
feign-server Light load balance server 8102

Eureka Server


Eureka web login info

  • Username:admin
  • Password:admin

Eureka monitor Url:

Config Repo


Config file list
  1. application.yml : common config environment
  2. oauth-server-[dev, pro].yml : oauth-server config environment
  3. resource-api-jdbc-server-[dev, pro].yml : resource-api-jdbc-server config environment
  4. resource-api-jwt-server-[dev, pro].yml : resource-api-jwt-server config environment
  5. oauth-sso-client-[dev, pro].yml : oauth-sso config environment
  6. oauth-web-client-[dev, pro].yml : oauth-web config environment
  7. zuul-server-[dev, pro].yml : zuul-server config environment
  8. loadlbalance-1-[dev, pro].yml : loadbalance-1 config environment
  9. loadlbalance-2-[dev, pro].yml : loadbalance-2 config environment
  10. hystrix-dashboard-[dev, pro].yml : hystrix-dashboard config environment
  11. hystrix-feign-[dev, pro].yml : hystrix-feign config environment
  12. feign-server-[dev, pro].yml : zfeign-server config environment

Config Server


The HTTP service has resources in the following form:

/{application}/{profile}[/{label}]

/{application}-{profile}.yml

/{label}/{application}-{profile}.yml

/{application}-{profile}.properties

/{label}/{application}-{profile}.properties

/{application}-{profile}.json

/{label}/{application}-{profile}.json

Admin manage system login info


  • Username:admin
  • Password:admin

Grant Types


1. Authorization Code
  • Client id:auth_test
  • Client secret:secret
2. resource owner password credentials
  • Client id:password_test
  • Client secret:secret
3. implicit
  • Client id:implicit_test
  • Client secret:secret
4. client credentials
  • Client id:client_test
  • Client secret:secret

Get Token URL(HTTP Method:POST)


1. Authorization Url

Get code

Get Token

2. resource owner password credentials Url

Get Token

3. implicit Url

Get Token

4. client credentials

Get Token

Request Url(HTTP Method:GET,POST)


Check Token Url(HTTP Method:GET,POST)


Refresh Token Url(HTTP Method:POST)


Web management


Feign server Test


  1. Start up loadbalance-1 and loadbalance-2 servers
  2. Start up Feign server or Hystrix Feign server
  3. Get access_token
  4. Call test Url

Feign server

Hystrix Feign server

About

Using Spring boot and Oauth build.

Resources

Stars

Watchers

Forks

Packages

No packages published