修改文件上传连接
This commit is contained in:
parent
b90603080e
commit
c3ca0e7ded
|
|
@ -37,7 +37,7 @@ public class NewsController {
|
|||
String fileName = file.getOriginalFilename();
|
||||
// String filePath = "F:\\Work\\file\\";
|
||||
String filePath = "/www/wwwroot/express/file/";
|
||||
String url = "http://47.96.37.195:8084/";
|
||||
String url = "http://apiexp.mytwins.top/file/";
|
||||
//确保有这个文件目录才能使用
|
||||
File dect = new File(filePath,fileName);
|
||||
News news = new News();
|
||||
|
|
@ -52,7 +52,7 @@ public class NewsController {
|
|||
}
|
||||
return new Result<>(true,1,url+fileName);
|
||||
}catch (RuntimeException e){
|
||||
System.out.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
// return new Result<>(false, -1, e.getMessage()+"系统错误");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,34 @@
|
|||
# 应用名称
|
||||
# \u5E94\u7528\u540D\u79F0
|
||||
spring.application.name=express
|
||||
management.endpoints.jmx.exposure.include=*
|
||||
management.endpoints.web.exposure.include=*
|
||||
management.endpoint.health.show-details=always
|
||||
# spring cloud access&secret config
|
||||
# 可以访问如下地址查看: https://usercenter.console.aliyun.com/#/manage/ak
|
||||
# \u53EF\u4EE5\u8BBF\u95EE\u5982\u4E0B\u5730\u5740\u67E5\u770B: https://usercenter.console.aliyun.com/#/manage/ak
|
||||
alibaba.cloud.access-key=****
|
||||
alibaba.cloud.secret-key=****
|
||||
# 应用服务 WEB 访问端口
|
||||
# \u5E94\u7528\u670D\u52A1 WEB \u8BBF\u95EE\u7AEF\u53E3
|
||||
server.port=8083
|
||||
server.servlet.context-path=/api
|
||||
logging.level.root=error
|
||||
# Actuator Web 访问端口
|
||||
# Actuator Web \u8BBF\u95EE\u7AEF\u53E3
|
||||
|
||||
management.server.port=8081
|
||||
mybatis.mapper-locations=classpath:mapper/*Mapper.xml
|
||||
mybatis.type-aliases-package=live.tomey.api.express.dao
|
||||
|
||||
#配置文件传输
|
||||
#\u914D\u7F6E\u6587\u4EF6\u4F20\u8F93
|
||||
spring.servlet.multipart.maxFileSize=100MB
|
||||
spring.servlet.multipart.maxRequestSize=200MB
|
||||
|
||||
# 数据库dataSource
|
||||
# \u6570\u636E\u5E93dataSource
|
||||
jdbc.driver=8zQIdS8RzOBmd4qRctgYdYM/fdvrjnIJHyQH1bD/jNs=
|
||||
#服务器本地127.0.0.1
|
||||
jdbc.urls=jdbc:mysql://127.0.0.1:3306/express?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
#\u670D\u52A1\u5668\u672C\u5730127.0.0.1
|
||||
jdbc.url=jdbc:mysql://127.0.0.1:3306/express?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
#azure
|
||||
jdbc.url=jdbc:mysql://13.75.92.40:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
#服务器ip
|
||||
jdbc.username=mall
|
||||
jdbc.urls=jdbc:mysql://13.75.92.40:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
#\u670D\u52A1\u5668ip
|
||||
jdbc.username=express
|
||||
jdbc.password=dr4ap4dbnyCMZTcr
|
||||
|
||||
# Mybatis
|
||||
|
|
@ -36,16 +36,16 @@ mybatis_config_file=mybatis-config.xml
|
|||
mapper_path=/mapper/**.xml
|
||||
typealias_package=live.tomey.api.express.entity
|
||||
|
||||
# 上传文件总的最大值
|
||||
# \u4E0A\u4F20\u6587\u4EF6\u603B\u7684\u6700\u5927\u503C
|
||||
spring.servlet.multipart.max-request-size=10MB
|
||||
# 单个文件的最大值
|
||||
# \u5355\u4E2A\u6587\u4EF6\u7684\u6700\u5927\u503C
|
||||
spring.servlet.multipart.max-file-size=10MB
|
||||
|
||||
## jsp
|
||||
spring.mvc.view.prefix=/WEB-INF/jsp/
|
||||
spring.mvc.view.suffix=.jsp
|
||||
|
||||
#Redis配置
|
||||
#Redis\u914D\u7F6E
|
||||
redis.hostname=34.92.103.14
|
||||
redis.port=6379
|
||||
redis.pool.maxActive=100
|
||||
|
|
@ -57,7 +57,7 @@ redis.timeout=20000
|
|||
|
||||
|
||||
|
||||
#Path管理
|
||||
#Path\u7BA1\u7406
|
||||
win.base.path=E:/Work/springbootpackage/projectdev/
|
||||
linux.base.path=/www/wwwroot/o2oimage/
|
||||
article.relevant.path=/upload/images/item/article/
|
||||
|
|
@ -67,24 +67,24 @@ shopcategory.relevant.path=/upload/images/item/shopcategory/
|
|||
|
||||
|
||||
|
||||
#文件域名管理
|
||||
#\u6587\u4EF6\u57DF\u540D\u7BA1\u7406
|
||||
file.url = http://file.afterglow.fun
|
||||
|
||||
#ftp配置
|
||||
#ftp\u914D\u7F6E
|
||||
ftp.service.address=34.92.131.32
|
||||
ftp.service.post=21
|
||||
ftp.service.username=o2obootftp
|
||||
ftp.service.password=mWRPccbzBP32wWwG
|
||||
ftp.service.encoding=UTF-8
|
||||
|
||||
#jwt配置
|
||||
# 代表这个JWT的接收对象,存入audience
|
||||
#jwt\u914D\u7F6E
|
||||
# \u4EE3\u8868\u8FD9\u4E2AJWT\u7684\u63A5\u6536\u5BF9\u8C61,\u5B58\u5165audience
|
||||
audience.clientId: 098f6bcd4621d373cade4e832627b4f6
|
||||
# 密钥, 经过Base64加密, 可自行替换
|
||||
# \u5BC6\u94A5, \u7ECF\u8FC7Base64\u52A0\u5BC6, \u53EF\u81EA\u884C\u66FF\u6362
|
||||
audience.base64Secret: MDk4ZjZiY2Q0NjIxZDM3M2NhZGU0ZTgzMjYyN2I0ZjY=
|
||||
# JWT的签发主体,存入issuer
|
||||
# JWT\u7684\u7B7E\u53D1\u4E3B\u4F53\uFF0C\u5B58\u5165issuer
|
||||
audience.name: restapiuser
|
||||
# 过期时间,时间戳
|
||||
# \u8FC7\u671F\u65F6\u95F4\uFF0C\u65F6\u95F4\u6233
|
||||
audience.expiresSecond: 172800
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue