From 3deeab77c98ddaffc0f478518811f52cb54993c5 Mon Sep 17 00:00:00 2001 From: "wangiegie@gmail.com" Date: Sat, 28 Oct 2017 18:29:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=AE=A4=E8=AF=81=E6=A8=A1=E5=9D=97=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pom.xml | 5 +-- .../pig/auth/PigAuthServerApplication.java | 0 .../auth/config/PigAuthorizationConfig.java | 0 .../pig/auth/controller/UserController.java | 0 .../auth/serivce/UserDetailServiceImpl.java | 0 .../src/main/resources/bootstrap.yml | 2 +- pig-common/pom.xml | 38 +++++++++++++++++++ pig-common/src/main/resources/bootstrap.yml | 12 ++++++ pig-gateway/pom.xml | 6 +++ pig-gateway/src/main/resources/bootstrap.yml | 2 +- pom.xml | 2 +- 11 files changed, 61 insertions(+), 6 deletions(-) rename {pig-service-auth => pig-auth-service}/pom.xml (94%) rename {pig-service-auth => pig-auth-service}/src/main/java/com/github/pig/auth/PigAuthServerApplication.java (100%) rename {pig-service-auth => pig-auth-service}/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java (100%) rename {pig-service-auth => pig-auth-service}/src/main/java/com/github/pig/auth/controller/UserController.java (100%) rename {pig-service-auth => pig-auth-service}/src/main/java/com/github/pig/auth/serivce/UserDetailServiceImpl.java (100%) rename {pig-service-auth => pig-auth-service}/src/main/resources/bootstrap.yml (94%) create mode 100644 pig-common/pom.xml create mode 100644 pig-common/src/main/resources/bootstrap.yml diff --git a/pig-service-auth/pom.xml b/pig-auth-service/pom.xml similarity index 94% rename from pig-service-auth/pom.xml rename to pig-auth-service/pom.xml index 67392770..d4b2e04c 100644 --- a/pig-service-auth/pom.xml +++ b/pig-auth-service/pom.xml @@ -4,11 +4,11 @@ 4.0.0 com.github.pig - pig-service-auth + pig-auth-service 0.0.1-SNAPSHOT jar - pig-service-auth + pig-auth-service jwt 认证服务 @@ -35,7 +35,6 @@ - diff --git a/pig-service-auth/src/main/java/com/github/pig/auth/PigAuthServerApplication.java b/pig-auth-service/src/main/java/com/github/pig/auth/PigAuthServerApplication.java similarity index 100% rename from pig-service-auth/src/main/java/com/github/pig/auth/PigAuthServerApplication.java rename to pig-auth-service/src/main/java/com/github/pig/auth/PigAuthServerApplication.java diff --git a/pig-service-auth/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java b/pig-auth-service/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java similarity index 100% rename from pig-service-auth/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java rename to pig-auth-service/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java diff --git a/pig-service-auth/src/main/java/com/github/pig/auth/controller/UserController.java b/pig-auth-service/src/main/java/com/github/pig/auth/controller/UserController.java similarity index 100% rename from pig-service-auth/src/main/java/com/github/pig/auth/controller/UserController.java rename to pig-auth-service/src/main/java/com/github/pig/auth/controller/UserController.java diff --git a/pig-service-auth/src/main/java/com/github/pig/auth/serivce/UserDetailServiceImpl.java b/pig-auth-service/src/main/java/com/github/pig/auth/serivce/UserDetailServiceImpl.java similarity index 100% rename from pig-service-auth/src/main/java/com/github/pig/auth/serivce/UserDetailServiceImpl.java rename to pig-auth-service/src/main/java/com/github/pig/auth/serivce/UserDetailServiceImpl.java diff --git a/pig-service-auth/src/main/resources/bootstrap.yml b/pig-auth-service/src/main/resources/bootstrap.yml similarity index 94% rename from pig-service-auth/src/main/resources/bootstrap.yml rename to pig-auth-service/src/main/resources/bootstrap.yml index 25861700..eb04551d 100644 --- a/pig-service-auth/src/main/resources/bootstrap.yml +++ b/pig-auth-service/src/main/resources/bootstrap.yml @@ -1,6 +1,6 @@ spring: application: - name: pig-service-auth + name: pig-auth-service cloud: config: fail-fast: true diff --git a/pig-common/pom.xml b/pig-common/pom.xml new file mode 100644 index 00000000..d789227d --- /dev/null +++ b/pig-common/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + + com.github.pig + pig-common + 0.0.1-SNAPSHOT + jar + + pig-common + common + + + com.github + pig + 1.0-SNAPSHOT + + + + + io.jsonwebtoken + jjwt + 0.7.0 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/pig-common/src/main/resources/bootstrap.yml b/pig-common/src/main/resources/bootstrap.yml new file mode 100644 index 00000000..58234efc --- /dev/null +++ b/pig-common/src/main/resources/bootstrap.yml @@ -0,0 +1,12 @@ +server: + port: 4000 +spring: + application: + name: pig-demo-service + +eureka: + instance: + prefer-ip-address: true + client: + serviceUrl: + defaultZone: http://127.0.0.1:9000/eureka/ diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml index 5cac9ee1..796bf845 100644 --- a/pig-gateway/pom.xml +++ b/pig-gateway/pom.xml @@ -23,6 +23,7 @@ pig-common 0.0.1-SNAPSHOT + org.springframework.cloud spring-cloud-starter-zuul @@ -37,6 +38,11 @@ org.springframework.cloud spring-cloud-starter-oauth2 + + + org.springframework.boot + spring-boot-starter-data-redis + diff --git a/pig-gateway/src/main/resources/bootstrap.yml b/pig-gateway/src/main/resources/bootstrap.yml index ff1b62b2..581b6448 100644 --- a/pig-gateway/src/main/resources/bootstrap.yml +++ b/pig-gateway/src/main/resources/bootstrap.yml @@ -30,6 +30,6 @@ security: oauth2: resource: loadBalanced: true - user-info-uri: http://pig-service-auth/user + user-info-uri: http://pig-auth-service/user prefer-token-info: false service-id: pig-gateway \ No newline at end of file diff --git a/pom.xml b/pom.xml index 67af5ae6..a2c557cc 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ pig-eureka pig-config pig-gateway - pig-service-auth + pig-auth-service pig-demo-service