feat: 升级SpringBoot和SpringCloud版本

This commit is contained in:
zlt2000
2023-11-10 14:59:27 +08:00
parent c7dfbc9e39
commit ec616bc1b5
133 changed files with 639 additions and 3666 deletions
@@ -3,7 +3,7 @@ package com.central.generator.controller;
import java.io.IOException;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import com.central.common.model.PageResult;
import com.central.generator.service.SysGeneratorService;
@@ -11,7 +11,7 @@ import java.util.Map;
/**
* @author zlt
*/
@FeignClient(name = ServiceNameConstants.SEARCH_SERVICE, fallbackFactory = SearchServiceFallbackFactory.class, decode404 = true)
@FeignClient(name = ServiceNameConstants.SEARCH_SERVICE, fallbackFactory = SearchServiceFallbackFactory.class, dismiss404 = true)
public interface AggregationService {
/**
* 查询文档列表
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
/**
* @author zlt
*/
@FeignClient(name = ServiceNameConstants.SEARCH_SERVICE, fallbackFactory = SearchServiceFallbackFactory.class, decode404 = true)
@FeignClient(name = ServiceNameConstants.SEARCH_SERVICE, fallbackFactory = SearchServiceFallbackFactory.class, dismiss404 = true)
public interface SearchService {
/**
* 查询文档列表
@@ -5,6 +5,7 @@ import com.central.search.client.feign.SearchService;
import com.fasterxml.jackson.databind.JsonNode;
import org.springframework.cloud.openfeign.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* searchService降级工场
@@ -12,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
* @author zlt
*/
@Slf4j
@Component
public class SearchServiceFallbackFactory implements FallbackFactory<SearchService> {
@Override
public SearchService create(Throwable throwable) {
@@ -4,6 +4,7 @@ import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;
/**
* 索引配置
@@ -14,6 +15,7 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
@Getter
@ConfigurationProperties(prefix = "zlt.indices")
@RefreshScope
@Component
public class IndexProperties {
/**
* 配置过滤的索引名:默认只显示这些索引
@@ -1,9 +1,8 @@
spring:
elasticsearch:
rest:
uris: ${zlt.elasticsearch.uris}
username: ${zlt.elasticsearch.username}
password: ${zlt.elasticsearch.password}
uris: ${zlt.elasticsearch.uris}
username: ${zlt.elasticsearch.username}
password: ${zlt.elasticsearch.password}
zlt:
indices:
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
/**
* @author 作者 owen E-mail: 624191343@qq.com