diff --git a/src/main/java/com/cultural/heritage/common/ErrorCode.java b/src/main/java/com/cultural/heritage/common/ErrorCode.java index 010bcd4..d94470a 100644 --- a/src/main/java/com/cultural/heritage/common/ErrorCode.java +++ b/src/main/java/com/cultural/heritage/common/ErrorCode.java @@ -4,6 +4,7 @@ import lombok.Getter; @Getter public enum ErrorCode { + SUCCESS(1,"ok"), PARAMS_ERROR(40000,"请求参数错误"), NOT_LOGIN_ERROR(40100,"未登录"), diff --git a/src/main/java/com/cultural/heritage/config/HweiOBSConfig.java b/src/main/java/com/cultural/heritage/config/HweiOBSConfig.java deleted file mode 100644 index ae4a740..0000000 --- a/src/main/java/com/cultural/heritage/config/HweiOBSConfig.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.cultural.heritage.config; - -import com.obs.services.ObsClient; -import com.obs.services.exception.ObsException; -import lombok.Data; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; - -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@Configuration -public class HweiOBSConfig { - - - /** - * 访问密钥AK - */ - @Value("${hwyun.obs.accessKey}") - private String accessKey; - - /** - * 访问密钥SK - */ - @Value("${hwyun.obs.securityKey}") - private String securityKey; - - /** - * 终端节点 - */ - @Value("${hwyun.obs.endPoint}") - private String endPoint; - - /** - * 桶 - */ - @Value("${hwyun.obs.bucketName}") - private String bucketName; - - /** - * @Description 获取OBS客户端实例 - * @return: com.obs.services.ObsClient - */ - public ObsClient getInstance() { - return new ObsClient(accessKey, securityKey, endPoint); - } - - /** - * @Description 销毁OBS客户端实例 - * @param: obsClient - */ - public void destroy(ObsClient obsClient){ - try { - obsClient.close(); - } catch (ObsException e) { - } catch (Exception e) { - } - } - - /** - * @Description 微服务文件存放路径 - * @return: java.lang.String - */ - public static String getObjectKey() { - // 项目或者服务名称 + 日期存储方式 - return "Hwei" + "/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date() )+ "/"; - } -} - diff --git a/src/main/java/com/cultural/heritage/config/Knife4jConfig.java b/src/main/java/com/cultural/heritage/config/Knife4jConfig.java index 1458092..4f8bc76 100644 --- a/src/main/java/com/cultural/heritage/config/Knife4jConfig.java +++ b/src/main/java/com/cultural/heritage/config/Knife4jConfig.java @@ -17,9 +17,9 @@ public class Knife4jConfig { public OpenAPI customOpenAPI() { return new OpenAPI() .info(new Info() - .title("碳索生活接口文档") + .title("匠承非遗接口文档") .version("1.0") - .description("碳索生活接口文档") + .description("匠承非遗接口文档") .termsOfService("http://doc.xiaominfo.com") .license(new License().name("Apache 2.0") .url("http://doc.xiaominfo.com"))); diff --git a/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java b/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java index f495c30..83df403 100644 --- a/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java +++ b/src/main/java/com/cultural/heritage/config/MyBatisPlusConfig.java @@ -11,7 +11,6 @@ import org.springframework.context.annotation.Configuration; * MyBatis Plus 配置 */ @Configuration -@MapperScan("com.xuande.takeaway.mapper") public class MyBatisPlusConfig { /** diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 6ff101a..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=Heritage diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..6d42188 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,6 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://123.249.108.160:3306/feiyi?serverTimezone=Asia/Shanghai + username: feiyi + password: 123456asd \ No newline at end of file