From 9c86abb29749d72652cdd45d438992b9e30f0857 Mon Sep 17 00:00:00 2001 From: xiongxiaoyang Date: Wed, 3 Jun 2020 02:38:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- novel-author/author-service/pom.xml | 4 ++-- novel-book/book-service/pom.xml | 10 ++++++++-- novel-common/pom.xml | 5 ----- novel-file/pom.xml | 11 +++++++++-- .../novel/{ => file}/config/OssProperties.java | 2 +- .../novel/{ => file}/feign/BookFeignClient.java | 2 +- .../{ => file}/schedule/CrawlPicTransSchedule.java | 6 +++--- .../java2nb/novel/{ => file}/service/FileService.java | 2 +- .../{ => file}/service/impl/FileServiceImpl.java | 8 +++----- novel-gateway/pom.xml | 4 ++-- novel-home/pom.xml | 4 ++-- novel-monitor/pom.xml | 4 ++-- novel-news/news-api/pom.xml | 10 ---------- novel-news/news-service/pom.xml | 4 ++-- .../news-service/src/main/resources/bootstrap.yml | 7 +++++++ novel-pay/pay-service/pom.xml | 4 ++-- novel-search/pom.xml | 11 +++++++++-- novel-user/user-service/pom.xml | 4 ++-- 18 files changed, 56 insertions(+), 46 deletions(-) rename novel-file/src/main/java/com/java2nb/novel/{ => file}/config/OssProperties.java (92%) rename novel-file/src/main/java/com/java2nb/novel/{ => file}/feign/BookFeignClient.java (88%) rename novel-file/src/main/java/com/java2nb/novel/{ => file}/schedule/CrawlPicTransSchedule.java (92%) rename novel-file/src/main/java/com/java2nb/novel/{ => file}/service/FileService.java (87%) rename novel-file/src/main/java/com/java2nb/novel/{ => file}/service/impl/FileServiceImpl.java (89%) diff --git a/novel-author/author-service/pom.xml b/novel-author/author-service/pom.xml index 2e9e8ad..a96196d 100644 --- a/novel-author/author-service/pom.xml +++ b/novel-author/author-service/pom.xml @@ -45,7 +45,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-book/book-service/pom.xml b/novel-book/book-service/pom.xml index ef3577b..e762f03 100644 --- a/novel-book/book-service/pom.xml +++ b/novel-book/book-service/pom.xml @@ -40,6 +40,12 @@ spring-cloud-netflix-hystrix + + org.redisson + redisson-spring-boot-starter + ${redisson.version} + + @@ -49,7 +55,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-common/pom.xml b/novel-common/pom.xml index 81102e8..b3998e0 100644 --- a/novel-common/pom.xml +++ b/novel-common/pom.xml @@ -48,11 +48,6 @@ spring-boot-starter-redis - - org.redisson - redisson-spring-boot-starter - ${redisson.version} - mysql diff --git a/novel-file/pom.xml b/novel-file/pom.xml index 26429aa..a338071 100644 --- a/novel-file/pom.xml +++ b/novel-file/pom.xml @@ -63,6 +63,13 @@ + + org.redisson + redisson-spring-boot-starter + ${redisson.version} + + + @@ -75,7 +82,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-file/src/main/java/com/java2nb/novel/config/OssProperties.java b/novel-file/src/main/java/com/java2nb/novel/file/config/OssProperties.java similarity index 92% rename from novel-file/src/main/java/com/java2nb/novel/config/OssProperties.java rename to novel-file/src/main/java/com/java2nb/novel/file/config/OssProperties.java index 024ddbc..c8ae5a9 100644 --- a/novel-file/src/main/java/com/java2nb/novel/config/OssProperties.java +++ b/novel-file/src/main/java/com/java2nb/novel/file/config/OssProperties.java @@ -1,4 +1,4 @@ -package com.java2nb.novel.config; +package com.java2nb.novel.file.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/novel-file/src/main/java/com/java2nb/novel/feign/BookFeignClient.java b/novel-file/src/main/java/com/java2nb/novel/file/feign/BookFeignClient.java similarity index 88% rename from novel-file/src/main/java/com/java2nb/novel/feign/BookFeignClient.java rename to novel-file/src/main/java/com/java2nb/novel/file/feign/BookFeignClient.java index 169aeb3..ec5c75a 100644 --- a/novel-file/src/main/java/com/java2nb/novel/feign/BookFeignClient.java +++ b/novel-file/src/main/java/com/java2nb/novel/file/feign/BookFeignClient.java @@ -1,4 +1,4 @@ -package com.java2nb.novel.feign; +package com.java2nb.novel.file.feign; import com.java2nb.novel.book.api.BookApi; diff --git a/novel-file/src/main/java/com/java2nb/novel/schedule/CrawlPicTransSchedule.java b/novel-file/src/main/java/com/java2nb/novel/file/schedule/CrawlPicTransSchedule.java similarity index 92% rename from novel-file/src/main/java/com/java2nb/novel/schedule/CrawlPicTransSchedule.java rename to novel-file/src/main/java/com/java2nb/novel/file/schedule/CrawlPicTransSchedule.java index 04f79e2..ec36cee 100644 --- a/novel-file/src/main/java/com/java2nb/novel/schedule/CrawlPicTransSchedule.java +++ b/novel-file/src/main/java/com/java2nb/novel/file/schedule/CrawlPicTransSchedule.java @@ -1,10 +1,10 @@ -package com.java2nb.novel.schedule; +package com.java2nb.novel.file.schedule; import com.java2nb.novel.book.entity.Book; import com.java2nb.novel.common.utils.Constants; import com.java2nb.novel.common.utils.FileUtil; -import com.java2nb.novel.feign.BookFeignClient; -import com.java2nb.novel.service.FileService; +import com.java2nb.novel.file.feign.BookFeignClient; +import com.java2nb.novel.file.service.FileService; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/novel-file/src/main/java/com/java2nb/novel/service/FileService.java b/novel-file/src/main/java/com/java2nb/novel/file/service/FileService.java similarity index 87% rename from novel-file/src/main/java/com/java2nb/novel/service/FileService.java rename to novel-file/src/main/java/com/java2nb/novel/file/service/FileService.java index bb73808..86e22fb 100644 --- a/novel-file/src/main/java/com/java2nb/novel/service/FileService.java +++ b/novel-file/src/main/java/com/java2nb/novel/file/service/FileService.java @@ -1,4 +1,4 @@ -package com.java2nb.novel.service; +package com.java2nb.novel.file.service; import java.io.File; diff --git a/novel-file/src/main/java/com/java2nb/novel/service/impl/FileServiceImpl.java b/novel-file/src/main/java/com/java2nb/novel/file/service/impl/FileServiceImpl.java similarity index 89% rename from novel-file/src/main/java/com/java2nb/novel/service/impl/FileServiceImpl.java rename to novel-file/src/main/java/com/java2nb/novel/file/service/impl/FileServiceImpl.java index 00c8435..10d092b 100644 --- a/novel-file/src/main/java/com/java2nb/novel/service/impl/FileServiceImpl.java +++ b/novel-file/src/main/java/com/java2nb/novel/file/service/impl/FileServiceImpl.java @@ -1,4 +1,4 @@ -package com.java2nb.novel.service.impl; +package com.java2nb.novel.file.service.impl; import com.aliyun.oss.OSSClient; import com.aliyun.oss.model.CannedAccessControlList; @@ -6,13 +6,11 @@ import com.aliyun.oss.model.CreateBucketRequest; import com.aliyun.oss.model.PutObjectRequest; import com.aliyun.oss.model.PutObjectResult; import com.java2nb.novel.common.utils.Constants; -import com.java2nb.novel.common.utils.FileUtil; import com.java2nb.novel.common.utils.UUIDUtil; -import com.java2nb.novel.config.OssProperties; -import com.java2nb.novel.service.FileService; +import com.java2nb.novel.file.config.OssProperties; +import com.java2nb.novel.file.service.FileService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Service; import java.io.File; diff --git a/novel-gateway/pom.xml b/novel-gateway/pom.xml index 4497304..4dc37e6 100644 --- a/novel-gateway/pom.xml +++ b/novel-gateway/pom.xml @@ -41,7 +41,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-home/pom.xml b/novel-home/pom.xml index 500a4bc..b1420e7 100644 --- a/novel-home/pom.xml +++ b/novel-home/pom.xml @@ -47,7 +47,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-monitor/pom.xml b/novel-monitor/pom.xml index 62983e9..c342063 100644 --- a/novel-monitor/pom.xml +++ b/novel-monitor/pom.xml @@ -42,7 +42,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-news/news-api/pom.xml b/novel-news/news-api/pom.xml index d81dcf8..155fc17 100644 --- a/novel-news/news-api/pom.xml +++ b/novel-news/news-api/pom.xml @@ -15,16 +15,6 @@ com.java2nb.novel novel-common - - - org.springframework.boot - spring-boot-starter-cache - - - org.springframework.boot - spring-boot-starter-redis - - diff --git a/novel-news/news-service/pom.xml b/novel-news/news-service/pom.xml index 28e2961..7c18465 100644 --- a/novel-news/news-service/pom.xml +++ b/novel-news/news-service/pom.xml @@ -46,7 +46,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-news/news-service/src/main/resources/bootstrap.yml b/novel-news/news-service/src/main/resources/bootstrap.yml index bab04cd..dcbf19e 100644 --- a/novel-news/news-service/src/main/resources/bootstrap.yml +++ b/novel-news/news-service/src/main/resources/bootstrap.yml @@ -3,3 +3,10 @@ spring: name: news-service profiles: active: dev + cloud: + nacos: + config: + ext‐config[0]: + data‐id: novel-redis.yml + group: novel-common + refresh: true diff --git a/novel-pay/pay-service/pom.xml b/novel-pay/pay-service/pom.xml index f4720d2..16f9472 100644 --- a/novel-pay/pay-service/pom.xml +++ b/novel-pay/pay-service/pom.xml @@ -42,7 +42,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-search/pom.xml b/novel-search/pom.xml index d705055..af5ca62 100644 --- a/novel-search/pom.xml +++ b/novel-search/pom.xml @@ -47,6 +47,13 @@ + + org.redisson + redisson-spring-boot-starter + ${redisson.version} + + + @@ -55,7 +62,7 @@ org.springframework.boot spring-boot-maven-plugin - + diff --git a/novel-user/user-service/pom.xml b/novel-user/user-service/pom.xml index 3a203a4..947d1ab 100644 --- a/novel-user/user-service/pom.xml +++ b/novel-user/user-service/pom.xml @@ -50,7 +50,7 @@ org.springframework.boot spring-boot-maven-plugin - +