spring boot访问根盘下的文件:
在yml里添加spring.mvc和resource
spring:
mvc:
static-path-pattern: /**
resources:
static-locations: classpath:/META-INF/resources/,classpath:/resources/, classpath:/static/, classpath:/public/, file:D:/head
因为我的文件是放在D:/head 下面(file后面接你的路径);
message:
根盘目录:
数据库存放数据:
nice,终于成功了,记录下。