lidongdong
2023-09-14 20f02c203edfa3338d31b2df1ab2c8dd95adea72
Merge remote-tracking branch 'origin/haucheng_panzhihua' into haucheng_panzhihua
1个文件已修改
4个文件已添加
165 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/pom.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_dlz/pom.xml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_dlz/src/main/java/com/panzhihua/service_dlz/ServiceDlzApplication.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_dlz/src/main/java/com/panzhihua/service_dlz/controller/CommonController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_dlz/src/main/resources/bootstrap.yml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/pom.xml
@@ -230,6 +230,7 @@
        <module>service_api</module>
        <!--物业service-->
        <module>service_property</module>
        <module>service_dlz</module>
    </modules>
    <packaging>pom</packaging>
springcloud_k8s_panzhihuazhihuishequ/service_dlz/pom.xml
New file
@@ -0,0 +1,91 @@
<?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>
    <parent>
        <groupId>com.panzhihua</groupId>
        <artifactId>zhihuishequ</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <groupId>com.panzhihua.zhihuishequ.dlz</groupId>
    <artifactId>service_dlz</artifactId>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.netflix.hystrix</groupId>
            <artifactId>hystrix-javanica</artifactId>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>com.panzhihua</groupId>
            <artifactId>common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <!--添加监控依赖包-->
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-prometheus</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
    </dependencies>
</project>
springcloud_k8s_panzhihuazhihuishequ/service_dlz/src/main/java/com/panzhihua/service_dlz/ServiceDlzApplication.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.service_dlz;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
@SpringCloudApplication
@EnableFeignClients(basePackages = {"com.panzhihua.common.service"})
@EnableEurekaClient
@EnableCircuitBreaker
@ComponentScan({"com.panzhihua.service_dlz", "com.panzhihua.common"})
public class ServiceDlzApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceDlzApplication.class, args);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_dlz/src/main/java/com/panzhihua/service_dlz/controller/CommonController.java
New file
@@ -0,0 +1,15 @@
package com.panzhihua.service_dlz.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/common")
public class CommonController {
    @GetMapping("/hello")
    public String hello(){
        return "world";
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_dlz/src/main/resources/bootstrap.yml
New file
@@ -0,0 +1,38 @@
spring:
  application:
    name: dlz
  cloud:
    config:
      discovery:
        enabled: true
        service-id: huacheng-config  # 注册中心的服务名
      profile: ${ENV:dev}  # 指定配置文件的环境
      uri: http://${CONFIG_URL:localhost}:6193/
  profiles:
    active: ${ENV:dev}
eureka:
  client:
    service-url:
      defaultZone: http://${EUREKA_URL:localhost}:8192/eureka
#实体加密、解密、字段脱敏拦截设置
domain:
  decrypt: true
  encrypt: true
  aesKey: Ryo7M3n8loC5
  sensitive: true
management:
  endpoints:
    web:
      exposure:
        include: '*'
  endpoint:
    health:
      show-details: always
  metrics:
    tags:
      application: dlz