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

Spring Boot 各种配置的官方手册从哪里查?

  •  
  •   rcocco · 335 天前 · 1689 次点击
    这是一个创建于 335 天前的主题,其中的信息可能已经有所发展或是发生改变。

    初学 Spring Boot 框架,有好多依赖我都不知道它在 application.yml 里有哪些配置能用,例如 spring-boot-starter-data-redis ,一些博客和文章了有介绍一小部分配置,我想知道所有的可用配置,不知道该从哪查。

    在官网 Spring.ioReference 里找了半天也没有。

    所以 Spring Boot 框架有没有那种大而全的官方手册?就像 Python Documentation 这样的

    6 条回复    2023-04-30 15:17:01 +08:00
    Tengdw
        1
    Tengdw  
       335 天前
    在引入的 starter 包里面找 @AutoConfiguration 注解的文件和 xxxProperties 的文件,大部分作者都会给配置项写注释说明的
    janus77
        2
    janus77  
       335 天前
    试试这样搜 spring-boot-starter-data-redis site:docs.spring.io
    我搜了一下 结果在这里 https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/html/using-spring-boot.html
    sorcerer
        4
    sorcerer  
       335 天前 via Android
    以前只能去找官方文档翻,现在我都问 chatgpt 了
    yuanxiaosong
        5
    yuanxiaosong  
       335 天前
    另一种方法,打开 spring-boot-autoconfigure 这个依赖包,找到具体的包“package org.springframework.boot.autoconfigure.data.redis”,你会发现有个前缀“@ConfigurationProperties(prefix = "spring.redis")”,用“spring.redis”去对应文档里面查就好了。
    rcocco
        6
    rcocco  
    OP
       333 天前
    @yuanxiaosong 感谢,官网那个指向最新版的链接 /docs/current/reference 是没有的,没想到在旧版手册里。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1441 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:49 · PVG 07:49 · LAX 16:49 · JFK 19:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.