修改了配置

This commit is contained in:
chen-xin-zhi 2024-10-23 15:33:02 +08:00
parent 4614ca2ab9
commit e95cb1d3a5
6 changed files with 9 additions and 74 deletions

View File

@ -4,6 +4,7 @@ import lombok.Getter;
@Getter
public enum ErrorCode {
SUCCESS(1,"ok"),
PARAMS_ERROR(40000,"请求参数错误"),
NOT_LOGIN_ERROR(40100,"未登录"),

View File

@ -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() )+ "/";
}
}

View File

@ -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")));

View File

@ -11,7 +11,6 @@ import org.springframework.context.annotation.Configuration;
* MyBatis Plus 配置
*/
@Configuration
@MapperScan("com.xuande.takeaway.mapper")
public class MyBatisPlusConfig {
/**

View File

@ -1 +0,0 @@
spring.application.name=Heritage

View File

@ -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