嗨〜我是初级程序员..我尝试直接将图像上传到classpath! 但这是错误代码!我想在application.yaml中设置图像目录地址。帮帮我:)
## application.yaml
mybatis:
mapper-locations: classpath:/sqlmap/sqlmapper_*.xml
file:
upload-dir: **classpath:/static/img** ## error!
upload-dir: C:\Users\img ## success!
答案 0 :(得分:0)
尝试一下:
spring:
http:
multipart:
location: d:/root