• 请不要在回答技术问题时复制粘贴 AI 生成的内容
movq
V2EX  ›  程序员

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

  •  
  •   movq · Oct 30, 2022 · 1744 views
    This topic created in 1292 days ago, the information mentioned may be changed or developed.

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

    比如我今天试了一个东西

    xxx.destination=addr1,addr2

    死活不成功,然后我改成

    xxx.destination=addr1, addr2

    就成功了

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

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

    5 replies    2022-10-31 15:23:42 +08:00
    jaredyam
        1
    jaredyam  
       Oct 30, 2022
    是不是应该看下代码里怎么使用这个 property 的?
    Akitora
        2
    Akitora  
       Oct 30, 2022
    得看各个库里怎么定义和解析配置的
    levon
        3
    levon  
       Oct 31, 2022
    能用就别纠结
    chendy
        4
    chendy  
       Oct 31, 2022
    addr1, addr2 这种应该是代码自己做的解析
    所以要么找相关库的文档,要么翻一下代码(或者反编译的代码)看下是怎么做的解析
    qizheng22
        5
    qizheng22  
       Oct 31, 2022
    spring boot properties 文件中的属有属性和说明,官方有这个文档列表的。
    https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   902 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 20:59 · PVG 04:59 · LAX 13:59 · JFK 16:59
    ♥ Do have faith in what you're doing.