首页>代码>spring boot通过@ConfigurationProperties注解实现加载application.properties配置,支持多层嵌套语法>/springboot-nested-properties-file/src/main/java/com/hellokoding/util/SimpleProperties.java
package com.hellokoding.util;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "simple")
public class SimpleProperties {
    private String a;

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }
}
最近下载更多
最近浏览更多
longge828 2023年2月1日
暂无贡献等级
513142804 2022年7月12日
暂无贡献等级
cab123123  LV8 2022年4月3日
君知否  LV17 2021年11月11日
chh411 2021年10月8日
暂无贡献等级
helingzhi1992  LV1 2021年9月8日
liangflying521 2021年8月5日
暂无贡献等级
chapter06 2021年4月7日
暂无贡献等级
小王wang  LV10 2021年3月1日
hrose12  LV21 2020年12月7日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友