V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
movq
V2EX  ›  程序员

Spring 的.properties 文件有没有什么文档可以看

  •  
  •   movq · 2022-10-30 18:18:05 +08:00 · 1252 次点击
    这是一个创建于 515 天前的主题,其中的信息可能已经有所发展或是发生改变。

    感觉一些细节,并不能找到相关的资料

    比如我今天试了一个东西

    xxx.destination=addr1,addr2

    死活不成功,然后我改成

    xxx.destination=addr1, addr2

    就成功了

    不知道背后是什么原理。难道逗号+空格才能作为分隔符吗?

    网上查也查不到,只能自己试,太费时间了

    5 条回复    2022-10-31 15:23:42 +08:00
    jaredyam
        1
    jaredyam  
       2022-10-30 19:41:56 +08:00
    是不是应该看下代码里怎么使用这个 property 的?
    Akitora
        2
    Akitora  
       2022-10-30 19:54:09 +08:00
    得看各个库里怎么定义和解析配置的
    levon
        3
    levon  
       2022-10-31 08:39:57 +08:00
    能用就别纠结
    chendy
        4
    chendy  
       2022-10-31 10:25:58 +08:00
    addr1, addr2 这种应该是代码自己做的解析
    所以要么找相关库的文档,要么翻一下代码(或者反编译的代码)看下是怎么做的解析
    qizheng22
        5
    qizheng22  
       2022-10-31 15:23:42 +08:00
    spring boot properties 文件中的属有属性和说明,官方有这个文档列表的。
    https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3326 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:44 · PVG 21:44 · LAX 06:44 · JFK 09:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.