网站首页
编程语言
数据库
系统相关
其他分享
编程问答
geoPackagePath
2024-07-26
Springboot配置文件的变量在代码中读取
要将路径值存储在application.yml文件中并在Java代码中读取,可以使用@Value注解来注入这个值。1.在application.yml中定义变量首先,在application.yml文件中定义你的路径变量,例如:custom:geoPackagePath:static/route_net/marnet_plus_5km.gpkg2.使用@Value注