Browse Source

first commit

felixyin 7 months ago
commit
a7c798c68a

+ 33 - 0
.gitignore

@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

+ 9 - 0
Dockerfile

@@ -0,0 +1,9 @@
+FROM openjdk:11-jdk
+LABEL maintainer="研究院研发组 <research-maint@itcast.cn>"
+RUN echo "Asia/Shanghai" > /etc/timezone
+ARG PACKAGE_PATH=./target/jzo2o-publics.jar
+
+ADD ${PACKAGE_PATH:-./} app.jar
+EXPOSE 8080
+EXPOSE 9999
+ENTRYPOINT ["sh","-c","java  -jar $JAVA_OPTS app.jar"]

+ 0 - 0
README.md


+ 11 - 0
jzo2o-publics-startup.bat

@@ -0,0 +1,11 @@
+@echo off
+chcp 65001
+title jzo2o-publics
+echo.
+echo [信息] 打包publics公共服务工程。
+echo.
+call  mvn  package -DskipTests=true
+echo.
+echo [信息] 启动publics公共服务工程。
+echo.
+java -Dfile.encoding=utf-8 -Xmx128m -jar target/jzo2o-publics.jar

+ 86 - 0
pom.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.jzo2o</groupId>
+    <artifactId>jzo2o-publics</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+    <parent>
+        <artifactId>jzo2o-parent</artifactId>
+        <groupId>com.jzo2o</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <properties>
+        <maven.compiler.source>11</maven.compiler.source>
+        <maven.compiler.target>11</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.jzo2o</groupId>
+            <artifactId>jzo2o-mvc</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.jzo2o</groupId>
+            <artifactId>jzo2o-knife4j-web</artifactId>
+        </dependency>
+
+        <!--单元测试-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.jzo2o</groupId>
+            <artifactId>jzo2o-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.jzo2o</groupId>
+            <artifactId>jzo2o-thirdparty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.jzo2o</groupId>
+            <artifactId>jzo2o-redis</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build-info</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <mainClass>com.jzo2o.publics.PublicsApplication</mainClass>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 22 - 0
src/main/java/com/jzo2o/publics/PublicsApplication.java

@@ -0,0 +1,22 @@
+package com.jzo2o.publics;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+
+/**
+ * 通用服务启动类
+ *
+ * @author itcast
+ * @create 2023/8/23 17:14
+ **/
+@Slf4j
+@SpringBootApplication
+public class PublicsApplication {
+    public static void main(String[] args) {
+        new SpringApplicationBuilder(PublicsApplication.class)
+                .build(args)
+                .run(args);
+        log.info("家政服务-通用服务启动");
+    }
+}

+ 40 - 0
src/main/java/com/jzo2o/publics/controller/inner/InnerMapController.java

@@ -0,0 +1,40 @@
+package com.jzo2o.publics.controller.inner;
+
+import com.jzo2o.api.publics.MapApi;
+import com.jzo2o.api.publics.dto.response.LocationResDTO;
+import com.jzo2o.thirdparty.core.map.MapService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 内部接口 - 地址相关接口
+ *
+ * @author itcast
+ * @create 2023/7/10 09:57
+ **/
+@RestController
+@RequestMapping("/inner/map")
+@Api(tags = "内部接口 - 地图服务相关接口")
+public class InnerMapController implements MapApi {
+    @Resource
+    private MapService mapService;
+
+    @Override
+    @GetMapping("/getLocationByAddress")
+    @ApiOperation("根据地址查询经纬度")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "address", value = "地址", required = true, dataTypeClass = String.class)
+    })
+    public LocationResDTO getLocationByAddress(@RequestParam("address") String address) {
+        String location = mapService.getLocationByAddress(address);
+        return new LocationResDTO(location);
+    }
+}

+ 44 - 0
src/main/java/com/jzo2o/publics/controller/inner/InnerSmsCodeController.java

@@ -0,0 +1,44 @@
+package com.jzo2o.publics.controller.inner;
+
+import com.jzo2o.api.publics.SmsCodeApi;
+import com.jzo2o.api.publics.dto.response.BooleanResDTO;
+import com.jzo2o.common.enums.SmsBussinessTypeEnum;
+import com.jzo2o.publics.service.ISmsCodeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 验证码
+ *
+ * @author itcast
+ * @create 2023/9/24 09:48
+ **/
+@RestController
+@RequestMapping("/inner/sms-code")
+@Api(tags = "内部接口 - 验证码相关接口")
+public class InnerSmsCodeController implements SmsCodeApi {
+    @Resource
+    private ISmsCodeService smsCodeService;
+
+    @Override
+    @GetMapping("/verify")
+    @ApiOperation("校验短信验证码")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "phone", value = "验证手机号", required = true, dataTypeClass = String.class),
+            @ApiImplicitParam(name = "bussinessType", value = "业务类型", required = true, dataTypeClass = SmsBussinessTypeEnum.class),
+            @ApiImplicitParam(name = "verifyCode", value = "验证码", required = true, dataTypeClass = String.class)
+    })
+    public BooleanResDTO verify(@RequestParam("phone") String phone,
+                                @RequestParam("bussinessType") SmsBussinessTypeEnum bussinessType,
+                                @RequestParam("verifyCode") String verifyCode) {
+        return new BooleanResDTO(smsCodeService.verify(phone, bussinessType, verifyCode));
+    }
+}

+ 53 - 0
src/main/java/com/jzo2o/publics/controller/inner/InnerWechatController.java

@@ -0,0 +1,53 @@
+package com.jzo2o.publics.controller.inner;
+
+import com.jzo2o.api.publics.WechatApi;
+import com.jzo2o.api.publics.dto.response.OpenIdResDTO;
+import com.jzo2o.api.publics.dto.response.PhoneResDTO;
+import com.jzo2o.thirdparty.core.wechat.WechatService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 微信服务
+ *
+ * @author itcast
+ * @create 2023/8/23 19:31
+ **/
+@RestController
+@RequestMapping("/inner/wechat")
+@Api(tags = "内部接口 - 微信服务相关接口")
+public class InnerWechatController implements WechatApi {
+
+    @Resource
+    private WechatService wechatService;
+
+    @Override
+    @GetMapping("/getOpenId")
+    @ApiOperation("获取openId")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "code", value = "登录凭证", required = true, dataTypeClass = String.class)
+    })
+    public OpenIdResDTO getOpenId(@RequestParam("code") String code) {
+        String openId = wechatService.getOpenid(code);
+        return new OpenIdResDTO(openId);
+    }
+
+    @Override
+    @GetMapping("/getPhone")
+    @ApiOperation("获取手机号")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "code", value = "手机号凭证", required = true, dataTypeClass = String.class)
+    })
+    public PhoneResDTO getPhone(@RequestParam("code") String code) {
+        String phone = wechatService.getPhone(code);
+        return new PhoneResDTO(phone);
+    }
+}

+ 41 - 0
src/main/java/com/jzo2o/publics/controller/outer/MapController.java

@@ -0,0 +1,41 @@
+package com.jzo2o.publics.controller.outer;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.jzo2o.publics.model.dto.response.MapLocationResDTO;
+import com.jzo2o.thirdparty.core.map.MapService;
+import com.jzo2o.thirdparty.dto.MapLocationDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.validation.constraints.NotNull;
+
+/**
+ * 用户端 - 地址相关接口
+ *
+ * @author itcast
+ * @create 2023/7/10 09:57
+ **/
+@RestController
+@RequestMapping("/map")
+@Api(tags = "地图服务相关接口")
+public class MapController {
+    @Resource
+    private MapService mapService;
+
+    @GetMapping("/regeo")
+    @ApiOperation("根据经纬度查询地址信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "location", value = "经纬度", required = true, dataTypeClass = String.class)
+    })
+    public MapLocationResDTO getCityCodeByLocation(@NotNull(message = "坐标不能为空") @RequestParam("location") String location) {
+        MapLocationDTO mapLocationDTO = mapService.getCityCodeByLocation(location);
+        return BeanUtil.toBean(mapLocationDTO, MapLocationResDTO.class);
+    }
+}

+ 32 - 0
src/main/java/com/jzo2o/publics/controller/outer/SmsCodeController.java

@@ -0,0 +1,32 @@
+package com.jzo2o.publics.controller.outer;
+
+import com.jzo2o.publics.model.dto.request.SmsCodeSendReqDTO;
+import com.jzo2o.publics.service.ISmsCodeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 验证码
+ *
+ * @author itcast
+ * @create 2023/9/24 09:48
+ **/
+@RestController
+@RequestMapping("/sms-code")
+@Api(tags = "验证码相关接口")
+public class SmsCodeController {
+    @Resource
+    private ISmsCodeService smsCodeService;
+
+    @PostMapping("/send")
+    @ApiOperation("发送短信验证码")
+    public void smsCodeSend(@RequestBody SmsCodeSendReqDTO smsCodeSendReqDTO) {
+        smsCodeService.smsCodeSend(smsCodeSendReqDTO);
+    }
+}

+ 43 - 0
src/main/java/com/jzo2o/publics/controller/outer/StorageController.java

@@ -0,0 +1,43 @@
+package com.jzo2o.publics.controller.outer;
+
+import com.jzo2o.publics.model.dto.response.StorageUploadResDTO;
+import com.jzo2o.thirdparty.core.storage.StorageService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+/**
+ * @author itcast
+ */
+@Slf4j
+@RestController
+@RequestMapping("/storage")
+@Api(tags = "存储相关接口")
+public class StorageController {
+    @Resource
+    private StorageService storageService;
+
+    @ApiOperation(value = "文件上传")
+    @PostMapping("/upload")
+    public StorageUploadResDTO upload(@RequestPart("file") MultipartFile file) {
+        //获得文件扩展名
+        String originalFilename = file.getOriginalFilename();
+        String extension = originalFilename.substring(originalFilename.lastIndexOf("."));
+        String url = null;
+        try {
+            url = storageService.upload(extension, new ByteArrayInputStream(file.getBytes()));
+        } catch (IOException e) {
+            log.error("文件上传失败,原因:", e);
+        }
+        return new StorageUploadResDTO(url);
+    }
+}

+ 14 - 0
src/main/java/com/jzo2o/publics/model/dto/request/SmsCodeSendReqDTO.java

@@ -0,0 +1,14 @@
+package com.jzo2o.publics.model.dto.request;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel("短信验证码下发接口")
+public class SmsCodeSendReqDTO {
+    @ApiModelProperty(value = "下发手机号码",required = true)
+    private String phone;
+    @ApiModelProperty("业务类型,1:机构注册,2:机构忘记密码,3:服务人员登录")
+    private String bussinessType;
+}

+ 46 - 0
src/main/java/com/jzo2o/publics/model/dto/response/MapLocationResDTO.java

@@ -0,0 +1,46 @@
+package com.jzo2o.publics.model.dto.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 地图定位响应信息
+ *
+ * @author itcast
+ * @create 2023/7/10 10:04
+ **/
+@Data
+@ApiModel("地图定位响应信息")
+public class MapLocationResDTO {
+
+    /**
+     * 城市编码
+     */
+    @ApiModelProperty("城市编码")
+    private String cityCode;
+
+    /**
+     * 省
+     */
+    @ApiModelProperty("省")
+    private String province;
+
+    /**
+     * 市
+     */
+    @ApiModelProperty("市")
+    private String city;
+
+    /**
+     * 区
+     */
+    @ApiModelProperty("区")
+    private String district;
+
+    /**
+     * 详细地址
+     */
+    @ApiModelProperty("详细地址")
+    private String fullAddress;
+}

+ 21 - 0
src/main/java/com/jzo2o/publics/model/dto/response/StorageUploadResDTO.java

@@ -0,0 +1,21 @@
+package com.jzo2o.publics.model.dto.response;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 文件上传响应值
+ *
+ * @author itcast
+ * @create 2023/7/6 15:29
+ **/
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class StorageUploadResDTO {
+    /**
+     * 文件地址
+     */
+    private String url;
+}

+ 21 - 0
src/main/java/com/jzo2o/publics/service/ISmsCodeService.java

@@ -0,0 +1,21 @@
+package com.jzo2o.publics.service;
+
+import com.jzo2o.common.enums.SmsBussinessTypeEnum;
+import com.jzo2o.publics.model.dto.request.SmsCodeSendReqDTO;
+
+public interface ISmsCodeService {
+
+    /**
+     * 发送短信验证码
+     * @param smsCodeSendReqDTO
+     */
+    void smsCodeSend(SmsCodeSendReqDTO smsCodeSendReqDTO);
+
+    /**
+     * 校验短信验证码
+     * @param phone 验证手机号
+     * @param bussinessType 业务类型
+     * @return 验证结果
+     */
+    boolean verify(String phone, SmsBussinessTypeEnum bussinessType, String verifyCode);
+}

+ 51 - 0
src/main/java/com/jzo2o/publics/service/impl/SmsCodeServiceImpl.java

@@ -0,0 +1,51 @@
+package com.jzo2o.publics.service.impl;
+
+import com.jzo2o.common.constants.CommonRedisConstants;
+import com.jzo2o.common.enums.SmsBussinessTypeEnum;
+import com.jzo2o.common.utils.StringUtils;
+import com.jzo2o.publics.model.dto.request.SmsCodeSendReqDTO;
+import com.jzo2o.publics.service.ISmsCodeService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.concurrent.TimeUnit;
+
+@Service
+@Slf4j
+public class SmsCodeServiceImpl implements ISmsCodeService {
+
+    @Resource
+    private RedisTemplate<String, String> redisTemplate;
+
+    @Override
+    public void smsCodeSend(SmsCodeSendReqDTO smsCodeSendReqDTO) {
+        if(StringUtils.isEmpty(smsCodeSendReqDTO.getPhone()) || StringUtils.isEmpty(smsCodeSendReqDTO.getBussinessType())) {
+            log.debug("不能发送短信验证码,phone:{},bussinessType:{}", smsCodeSendReqDTO.getPhone(), smsCodeSendReqDTO.getBussinessType());
+            return;
+        }
+        String redisKey = String.format(CommonRedisConstants.RedisKey.VERIFY_CODE, smsCodeSendReqDTO.getPhone(), smsCodeSendReqDTO.getBussinessType());
+        // 取6位随机数
+//        String verifyCode = (int)(Math.random() * 1000000) + "";
+        String verifyCode = "123456";//为方便测试固定为123456
+        log.info("向手机号{}发送验证码{}",smsCodeSendReqDTO.getPhone(),verifyCode);
+        //todo调用短信平台接口向指定手机发验证码...
+        // 短信验证码有效期5分钟
+        redisTemplate.opsForValue().set(redisKey, verifyCode, 300, TimeUnit.SECONDS);
+    }
+
+    @Override
+    public boolean verify(String phone, SmsBussinessTypeEnum bussinessType, String verifyCode) {
+        // 1.验证前准备
+        String redisKey = String.format(CommonRedisConstants.RedisKey.VERIFY_CODE, phone, bussinessType.getType());
+        String verifyCodeInRedis = redisTemplate.opsForValue().get(redisKey);
+
+        // 2.短验验证,验证通过后删除code,code只能使用一次
+        boolean verifyResult = StringUtils.isNotEmpty(verifyCode) && verifyCode.equals(verifyCodeInRedis);
+        if(verifyResult) {
+            redisTemplate.delete(redisKey);
+        }
+        return verifyResult;
+    }
+}

+ 18 - 0
src/main/resources/bootstrap-dev.yml

@@ -0,0 +1,18 @@
+spring:
+  cloud:
+    nacos:
+      username: nacos
+      password: nacos
+      server-addr: 192.168.101.68:8848
+      config:
+        namespace: 75a593f5-33e6-4c65-b2a0-18c403d20f63
+        file-extension: yaml
+      discovery:
+        namespace: 75a593f5-33e6-4c65-b2a0-18c403d20f63
+        ip: ${ACCESS_IP:}
+
+
+#################     日志配置     #################
+logging:
+  level:
+    com.jzo2o: debug

+ 14 - 0
src/main/resources/bootstrap-prod.yml

@@ -0,0 +1,14 @@
+spring:
+  cloud:
+    nacos:
+      username: ${NACOS_USERNAME}
+      password: ${NACOS_PASSWORD}
+      server-addr: ${NACOS_ADDR}
+      config:
+        namespace: ${NACOS_NAMESPACE}
+        file-extension: yaml
+      discovery:
+        namespace: ${NACOS_NAMESPACE}
+logging:
+  level:
+    com.jzo2o: debug

+ 14 - 0
src/main/resources/bootstrap-test.yml

@@ -0,0 +1,14 @@
+spring:
+  cloud:
+    nacos:
+      username: ${NACOS_USERNAME}
+      password: ${NACOS_PASSWORD}
+      server-addr: ${NACOS_ADDR}
+      config:
+        namespace: ${NACOS_NAMESPACE}
+        file-extension: yaml
+      discovery:
+        namespace: ${NACOS_NAMESPACE}
+logging:
+  level:
+    com.jzo2o: debug

+ 63 - 0
src/main/resources/bootstrap.yml

@@ -0,0 +1,63 @@
+#################     服务器配置     #################
+server:
+  port: 11503
+  undertow:
+    accesslog:
+      enabled: true
+      pattern: "%t %a &quot;%r&quot; %s (%D ms)"
+      dir: /data/logs/undertow/${spring.application.name}/access-logs/
+  servlet:
+    context-path: /publics
+
+#################     spring公共配置     #################
+spring:
+  mvc:
+    path-match:
+      matching-strategy: ant_path_matcher
+    format:
+      date: yyyy-MM-dd HH:mm:ss
+  jackson:
+    time-zone: GMT+8
+    date-format: yyyy-MM-dd HH:mm:ss
+  profiles:
+    active: dev
+  application:
+    name: jzo2o-publics
+  main:
+    # 支持循环依赖注入
+    allow-circular-references: true
+    # bean名相同覆盖
+    allow-bean-definition-overriding: true
+  cloud:
+    nacos:
+      username: ${NACOS_USERNAME}
+      password: ${NACOS_PASSWORD}
+      server-addr: ${NACOS_ADDR}
+      discovery:
+        namespace: ${NACOS_NAMESPACE}
+      config:
+        namespace: ${NACOS_NAMESPACE}
+        file-extension: yaml
+        shared-configs: # 共享配置
+          - data-id: shared-redis-cluster.yaml # 共享redis集群配置
+            refresh: false
+
+#################     项目独有配置     #################
+swagger:
+  enable: true
+  package-path: com.jzo2o.publics.controller
+  title: 家政服务-通用服务接口文档
+  description: 用于通用服务进行管理
+  contact-name: 传智教育·研究院
+  contact-url: http://www.itcast.cn/
+  contact-email: yjy@itcast.cn
+  version: v1.0
+
+
+#################     日志配置     #################
+logging:
+  level:
+    com.jzo2o: debug
+    org.apache.http: info #es请求日志
+feign:
+  enable: true