spring 如何设置{userconfig}位置

zz2j4svz  于 5个月前  发布在  Spring
关注(0)|答案(1)|浏览(40)

从文档中:默认情况下,日志文件将生成到当前工作目录,您可以通过设置spring. shell. config. location来指定该目录。此属性可以包含占位符({userconfig}),它将解析为公共共享配置目录。
在我的application.properties中,我得到了以下内容:

spring.shell.config.location: "{userconfig}/mycli"
spring.shell.history.name: mycli.log

字符串
当我运行我的spring-shell应用程序时,我得到一个目录树结构,从我运行spring shell应用程序的位置看起来像这样:
x1c 0d1x的数据
我如何设置{userconfig},以便我实际上在我喜欢的位置获得日志文件?我查看了UserConfigAutoConfiguration类,我认为日志文件应该在System.getProperty("user.home") + "/" + ".config";中,但它似乎不起作用,或者更可能是我做了一些非常错误的事情:-)
--安迪

wixjitnu

wixjitnu1#

不知道发生了什么,但问题已经解决了。我想我搞砸了application.properties。

相关问题