Sfoglia il codice sorgente

add 配置 del 没有用的测试类

GITZYY 9 mesi fa
parent
commit
e86fc57268
20 ha cambiato i file con 247 aggiunte e 132 eliminazioni
  1. 1 2
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/api/ApiServiceImpl.java
  2. 4 9
      egress-gateway-service-infrastructure/pom.xml
  3. 1 1
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/ApiGateWayImpl/ApiGatewayImpl.java
  4. 3 28
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/cache/TestCacheService.java
  5. 1 1
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HessianUtils.java
  6. 1 1
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HttpConfiguration.java
  7. 1 2
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HttpTemPlateClient.java
  8. 1 1
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/config/DiamondConfig.java
  9. 1 1
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/config/RetryRequestConfig.java
  10. 1 2
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/config/RetryRestTemplate.java
  11. 48 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/FastJson2RedisSerializer.java
  12. 51 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/RedisConfig.java
  13. 96 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/utils/RedisUtil.java
  14. 1 9
      pom.xml
  15. 1 1
      start/src/main/java/com/hrsk/cloud/eg/Application.java
  16. 13 23
      start/src/main/resources/application-dev.yaml
  17. 11 35
      start/src/main/resources/application-pre.yaml
  18. 1 1
      start/src/main/resources/application.yaml
  19. 10 4
      start/src/test/java/StartTest.java
  20. 0 11
      start/src/test/java/TestApplication.java

+ 1 - 2
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/api/ApiServiceImpl.java

@@ -2,9 +2,8 @@ package com.hrsk.cloud.eg.app.api;
 import com.google.common.collect.Lists;
 import com.hrsk.cloud.eg.domain.api.*;
 import com.hrsk.cloud.eg.domain.api.common.ApiPayloadTypeEnum;
-import com.hrsk.cloud.eg.infrastructure.clinent.utils.HessianUtils;
+import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
 import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgApiEndpointDo;
-import com.hrsk.cloud.eg.infrastructure.repository.database.mapper.EgApiEndpointMapper;
 import com.hrsk.cloud.eg.infrastructure.service.EgApiEndpointService;
 import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
 import org.springframework.web.bind.annotation.GetMapping;

+ 4 - 9
egress-gateway-service-infrastructure/pom.xml

@@ -38,11 +38,6 @@
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
         </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>
@@ -55,13 +50,13 @@
             <groupId>commons-codec</groupId>
             <artifactId>commons-codec</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.alicp.jetcache</groupId>
-            <artifactId>jetcache-starter-redis</artifactId>
-        </dependency>
         <dependency>
             <groupId>com.baomidou</groupId>
             <artifactId>mybatis-plus-boot-starter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 1 - 1
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/ApiGateWayImpl/ApiGatewayImpl.java

@@ -1,7 +1,7 @@
 package com.hrsk.cloud.eg.infrastructure.ApiGateWayImpl;
 
 import com.hrsk.cloud.eg.domain.api.ApiGateway;
-import com.hrsk.cloud.eg.infrastructure.clinent.HttpTemPlateClient;
+import com.hrsk.cloud.eg.infrastructure.config.client.HttpTemPlateClient;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 

+ 3 - 28
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/cache/TestCacheService.java

@@ -1,11 +1,7 @@
 package com.hrsk.cloud.eg.infrastructure.cache;
 
-import com.alicp.jetcache.Cache;
-import com.alicp.jetcache.anno.CacheType;
-import com.alicp.jetcache.anno.CreateCache;
 import org.springframework.stereotype.Service;
 
-import java.util.concurrent.TimeUnit;
 
 /**
  * @author zhangyy
@@ -16,29 +12,8 @@ import java.util.concurrent.TimeUnit;
 @Service
 public class TestCacheService {
 
-    @CreateCache(name = "test",expire = 300,timeUnit = TimeUnit.SECONDS,cacheType = CacheType.REMOTE)
-    private Cache<String, String> cache;
-
-    /** 
-     * @description:  获取信息
-     * @param:  
-     * @return:  
-     * @author zhangyy
-     * @date: 2024/8/28 16:55
-     */ 
-    public String get(String key) {
-        return cache.get(key);
-    }
-
-    /**
-     * @description: 添加信息
-     * @param:  
-     * @return:  
-     * @author zhangyy
-     * @date: 2024/8/28 16:55
-     */ 
-    public void put(String key, String value) {
-        cache.put(key, value);
-    }
+
+
+
 
 }

+ 1 - 1
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/clinent/utils/HessianUtils.java → egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HessianUtils.java

@@ -1,4 +1,4 @@
-package com.hrsk.cloud.eg.infrastructure.clinent.utils;
+package com.hrsk.cloud.eg.infrastructure.config.client;
 
 import com.alibaba.cola.exception.SysException;
 import com.caucho.hessian.io.Hessian2Input;

+ 1 - 1
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/clinent/utils/HttpConfiguration.java → egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HttpConfiguration.java

@@ -1,4 +1,4 @@
-package com.hrsk.cloud.eg.infrastructure.clinent.utils;
+package com.hrsk.cloud.eg.infrastructure.config.client;
 
 import org.springframework.web.client.RestTemplate;
 

+ 1 - 2
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/clinent/HttpTemPlateClient.java → egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HttpTemPlateClient.java

@@ -1,7 +1,6 @@
-package com.hrsk.cloud.eg.infrastructure.clinent;
+package com.hrsk.cloud.eg.infrastructure.config.client;
 
 import com.hrsk.cloud.eg.domain.api.HttpApi;
-import com.hrsk.cloud.eg.infrastructure.clinent.config.RetryRestTemplate;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpMethod;

+ 1 - 1
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/clinent/config/DiamondConfig.java → egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/config/DiamondConfig.java

@@ -1,4 +1,4 @@
-package com.hrsk.cloud.eg.infrastructure.clinent.config;
+package com.hrsk.cloud.eg.infrastructure.config.client.config;
 
 public class DiamondConfig {
     public final static String DummyConfig = "DummyConfig";

+ 1 - 1
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/clinent/config/RetryRequestConfig.java → egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/config/RetryRequestConfig.java

@@ -1,4 +1,4 @@
-package com.hrsk.cloud.eg.infrastructure.clinent.config;
+package com.hrsk.cloud.eg.infrastructure.config.client.config;
 
 /**
  * Author: zhangyy

+ 1 - 2
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/clinent/config/RetryRestTemplate.java → egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/config/RetryRestTemplate.java

@@ -1,4 +1,4 @@
-package com.hrsk.cloud.eg.infrastructure.clinent.config;
+package com.hrsk.cloud.eg.infrastructure.config.client.config;
 
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.NoHttpResponseException;
@@ -20,7 +20,6 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
-import org.springframework.stereotype.Component;
 import org.springframework.web.client.RestTemplate;
 
 import java.io.IOException;

+ 48 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/FastJson2RedisSerializer.java

@@ -0,0 +1,48 @@
+package com.hrsk.cloud.eg.infrastructure.config.redis;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONReader;
+import com.alibaba.fastjson2.JSONWriter;
+import com.alibaba.fastjson2.filter.Filter;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.SerializationException;
+
+/**
+ * @description:  fast2Json 序列化类
+ * @param:
+ * @return:
+ * @author zhangyy
+ * @date: 2024/8/29 10:30
+ */
+public class FastJson2RedisSerializer<T> implements RedisSerializer<T> {
+
+    static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(
+            // 按需加上需要支持自动类型的类名前缀,范围越小越安全
+            "com.***.***"
+    );
+
+    private final Class<T> clazz;
+
+    public FastJson2RedisSerializer(Class<T> clazz) {
+        super();
+        this.clazz = clazz;
+    }
+
+    @Override
+    public byte[] serialize(T t) throws SerializationException {
+        if (t == null) {
+            return new byte[0];
+        }
+        return JSON.toJSONBytes(t, JSONWriter.Feature.WriteClassName);
+    }
+
+    @Override
+    public T deserialize(byte[] bytes) throws SerializationException {
+        if (ArrayUtils.isEmpty(bytes)) {
+            return null;
+        }
+
+        return JSON.parseObject(bytes, clazz, AUTO_TYPE_FILTER);
+    }
+}

+ 51 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/RedisConfig.java

@@ -0,0 +1,51 @@
+package com.hrsk.cloud.eg.infrastructure.config.redis;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+
+/**
+ * Created zhangyy
+ */
+@Configuration
+public class RedisConfig {
+
+    /**
+     * @SuppressWarnings 该批注的作用是给编译器一条指令,告诉它对被批注的代码元素内部的某些警告保持静默
+     *
+     *    关键字         用途
+     *    deprecation   使用了不赞成使用的类或方法时的警告
+     *    unchecked     执行了未检查的转换时的警告,例如当使用集合时没有用泛型 (Generics) 来指定集合保存的类型。
+     *    fallthrough   当 Switch 程序块直接通往下一种情况而没有 Break 时的警告。
+     *    path          在类路径、源文件路径等中有不存在的路径时的警告。
+     *    serial        当在可序列化的类上缺少 serialVersionUID 定义时的警告。
+     *    finally       任何 finally 子句不能正常完成时的警告。
+     *    all           关于以上所有情况的警告。
+     */
+
+//    注入 Spring 容器中,忽略所有警告
+    @Bean
+    @SuppressWarnings("all")
+    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
+        RedisTemplate<String, Object> template = new RedisTemplate<>();
+        template.setConnectionFactory(factory);
+        FastJson2RedisSerializer<Object> fastJson2RedisSerializer = new FastJson2RedisSerializer<>(Object.class);
+        StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
+//        key 采用 String 的序列化方式
+        template.setKeySerializer(stringRedisSerializer);
+//        hash 的 key 也采用 String 的序列化方式
+        template.setHashKeySerializer(stringRedisSerializer);
+//        value 的序列化方式采用 JSON
+        template.setValueSerializer(fastJson2RedisSerializer);
+//        hash value 的序列化方式也采用 JSON
+        template.setHashValueSerializer(fastJson2RedisSerializer);
+        template.afterPropertiesSet();
+        return template;
+    }
+
+}
+
+

+ 96 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/utils/RedisUtil.java

@@ -0,0 +1,96 @@
+package com.hrsk.cloud.eg.infrastructure.utils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: RedisUtil
+ * @date 2024/8/29 10:19
+ */
+@Slf4j
+@Component
+public class RedisUtil {
+    @Resource
+    private RedisTemplate<String, Object> redisTemplate;
+
+    /**
+     * 批量删除对应的value
+     *
+     * @param keys
+     */
+    public void remove(final String... keys) {
+        for (String key : keys) {
+            remove(key);
+        }
+    }
+    /**
+     * 删除对应的value
+     *
+     * @param key
+     */
+    public void remove(final String key) {
+        if (exists(key)) {
+            redisTemplate.delete(key);
+        }
+    }
+
+    /**
+     * 判断缓存中是否有对应的value
+     *
+     * @param key
+     * @return
+     */
+    public boolean exists(final String key) {
+        return redisTemplate.hasKey(key);
+    }
+
+    /**
+     * @description:  原子设置(过期时间必须填写)
+     * @param:  long 过期时间 秒为单位
+     * @return:
+     * @author zhangyy
+     * @date: 2024/8/29 10:35
+     */
+    public Boolean atomSet(final String key, final Object value,final long time) {
+        return redisTemplate.opsForValue().setIfAbsent(key, value,time, TimeUnit.SECONDS);
+    }
+
+    /**
+     * @description: 从redis 获取信息 k-v (v简单对象)
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/8/29 10:38
+     */
+    public Object get(final String key) {
+        if (exists(key)) {
+            return redisTemplate.opsForValue().get(key);
+        }
+        return new Object();
+    }
+
+    /**
+     * @description:
+     * @param: long time 秒
+     * @return:
+     * @author zhangyy
+     * @date: 2024/8/29 10:43
+     */
+    public Boolean set(final String key, final Object value,final long time) {
+         try {
+             redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
+             return true;
+         } catch (Exception e) {
+             log.error("redis set error",e);
+             return false;
+         }
+    }
+
+
+
+
+}

+ 1 - 9
pom.xml

@@ -25,8 +25,7 @@
         <http.version>4.5.5</http.version>
         <common-pools.version>2.4.2</common-pools.version>
         <mybatis-plus-generator.version>3.5.1</mybatis-plus-generator.version>
-        <jetcache.version>2.7.0.M1</jetcache.version>
-        <fast2json.version>2.0.25</fast2json.version>
+        <fast2json.version>2.0.7</fast2json.version>
         <guva.version>33.2.1-jre</guva.version>
     </properties>
 
@@ -133,23 +132,16 @@
                 <artifactId>commons-pool2</artifactId>
                 <version>${common-pools.version}</version>
             </dependency>
-            <dependency>
-                <groupId>com.alicp.jetcache</groupId>
-                <artifactId>jetcache-starter-redis</artifactId>
-                <version>${jetcache.version}</version>
-            </dependency>
             <dependency>
                 <groupId>com.alibaba.fastjson2</groupId>
                 <artifactId>fastjson2</artifactId>
                 <version>${fast2json.version}</version>
             </dependency>
-
             <dependency>
                 <groupId>com.google.guava</groupId>
                 <artifactId>guava</artifactId>
                 <version>${guva.version}</version>
             </dependency>
-
         </dependencies>
     </dependencyManagement>
 

+ 1 - 1
start/src/main/java/com/hrsk/cloud/eg/Application.java

@@ -9,7 +9,7 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 @Slf4j
-@SpringBootApplication
+@SpringBootApplication(scanBasePackages = {"com.alicp.jetcache.autoconfigure"})
 @EnableCreateCacheAnnotation
 @MapperScan("com.hrsk.cloud.eg.infrastructure.repository.database.mapper")
 @EnableMethodCache(basePackages = "com.hrsk.cloud.eg.infrastructure.cache")

+ 13 - 23
start/src/main/resources/application-dev.yaml

@@ -1,4 +1,16 @@
 spring:
+  application:
+  redis:
+    database: 0
+    host: 192.168.1.169
+    port: 6379
+    password: meloinfo2023!
+    lettuce:
+      pool:
+        max-idle: 300
+        max-active: 600
+        max-wait: 1000s
+    timeout: 5s
   datasource:
     druid:
       type: com.alibaba.druid.pool.DruidDataSource
@@ -23,26 +35,4 @@ spring:
       testOnReturn: false
       poolPreparedStatements: true
       maxOpenPreparedStatements: 20
-      logSlowSql: true
-jetcache:
-  statIntervalMinutes: 15
-  areaInCacheName: false
-  local:
-    default:
-      type: linkedhashmap
-      keyConvertor: fastjson
-      limit: 1000
-  remote:
-    default:
-      type: redis
-      keyConvertor: fastjson
-      valueEncoder: java
-      valueDecoder: java
-      poolConfig:
-        minIdle: 5
-        maxIdle: 20
-        maxTotal: 50
-      database: 0 # 连接工厂使用的数据库索引
-      host: 192.168.1.169 # 此处需要修改哈
-      port: 6379 # 此处需要修改哈
-      password: meloinfo2023! # 此处需要修改哈
+      logSlowSql: true

+ 11 - 35
start/src/main/resources/application-pre.yaml

@@ -20,38 +20,14 @@ spring:
       poolPreparedStatements: true
       maxOpenPreparedStatements: 20
       logSlowSql: true
-jetcache:
-  statIntervalMinutes: 0 # 指定统计间隔,以分钟为单位。0表示没有统计数据。
-  areaInCacheName: true # jetcache-anno使用缓存名称作为远程缓存密钥前缀,在jetcache 2.4.3 和之前的版本中,它总是在缓存名称中添加区域名称,从2.4.4开始我们有这个配置项,为兼容原因,默认值为true。
-  local:
-    default:
-      keyConvertor: fastjson # key 通过 fastjson 转换为 json
-      type: linkedhashmap
-      poolConfig:
-        minIdle: 5 # 连接池中的最小空闲连接数
-        maxIdle: 20 # 连接池中的最大空闲连接数
-        maxTotal: 50 # 连接池中的最大连接数
-  remote:
-    default:
-      keyConvertor: fastjson # key 通过 fastjson 转换为 json
-      valueEncoder: java #全局配置值编码器只需要远程缓存。两个内置valueEncoder是java和kryo
-      valueDecoder: java #全局配置值解码器只需要远程缓存。两个内置valueEncoder是java和kryo
-      type: redis # 类型,远程缓存类型有redis和tair
-      host: 47.96.139.31 # 远程缓存地址
-      port: 6380 # 远程缓存端口
-      password: IICdQIBA#DANB%gkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAK8f% # 缓存密码
-      poolConfig:
-        minIdle: 10 # 连接池中的最小空闲连接数
-        maxIdle: 300 # 连接池中的最大空闲连接数
-        maxTotal: 100 # 连接池中的最大连接数
-#  redis:
-#    database: 8
-#    host: 47.96.139.31
-#    port: 6380
-#    password: IICdQIBA#DANB%gkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAK8f%
-#    lettuce:
-#      pool:
-#        max-idle: 300
-#        max-active: 600
-#        max-wait: 1000s
-#    timeout: 5s
+  redis:
+    database: 8
+    host: 47.96.139.31
+    port: 6380
+    password: IICdQIBA#DANB%gkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAK8f%
+    lettuce:
+      pool:
+        max-idle: 300
+        max-active: 600
+        max-wait: 1000s
+    timeout: 5s

+ 1 - 1
start/src/main/resources/application.yaml

@@ -8,7 +8,7 @@ spring:
   application:
     name: eg-server
   profiles:
-    active: dev
+    active: pre
 #mybatis
 mybatis-plus:
   mapper-locations: classpath*:mapper/**/*.xml

+ 10 - 4
start/src/test/java/StartTest.java

@@ -1,11 +1,15 @@
 import com.hrsk.cloud.eg.Application;
-import com.hrsk.cloud.eg.infrastructure.cache.TestCacheService;
+import com.hrsk.cloud.eg.constant.BusinessPrefixEnum;
+import com.hrsk.cloud.eg.infrastructure.utils.RedisUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
 import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @author zhangyy
@@ -18,10 +22,12 @@ import javax.annotation.Resource;
 public class StartTest {
 
     @Resource
-    private TestCacheService testCacheService;
+    private RedisUtil redisUtil;
+
     @Test
     public void test(){
-        testCacheService.put("1","1");
-
+        Map<String,String> map = new HashMap<>();
+        map.put("key","value");
+       redisUtil.set(BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+"test",map,5000 );
     }
 }

+ 0 - 11
start/src/test/java/TestApplication.java

@@ -1,11 +0,0 @@
-import com.hrsk.cloud.eg.Application;
-import org.springframework.boot.SpringApplication;
-import org.springframework.context.ApplicationContext;
-
-public class TestApplication {
-
-    public static void main(String[] args) {
-        //这里填的是TestApplication
-        ApplicationContext context = SpringApplication.run(Application.class, args);
-    }
-}