首页>代码>Spring Boot学习(二)之属性配置文件详解 博客代码>/springbootstudy-demo2/src/main/java/com/xiaojingg/service/BlogProperties.java
package com.xiaojingg.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 筱进GG
 */
@Component
public class BlogProperties {

    @Value("${com.xiaojingg.blog.name}")
    private String name;
    @Value("${com.xiaojingg.blog.title}")
    private String title;
    @Value("${com.xiaojingg.blog.desc}")
    private String desc;

    @Value("${com.xiaojingg.blog.value}")
    private String value;
    @Value("${com.xiaojingg.blog.number}")
    private Integer number;
    @Value("${com.xiaojingg.blog.bignumber}")
    private Long bignumber;
    @Value("${com.xiaojingg.blog.test1}")
    private Integer test1;
    @Value("${com.xiaojingg.blog.test2}")
    private Integer test2;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Long getBignumber() {
        return bignumber;
    }

    public void setBignumber(Long bignumber) {
        this.bignumber = bignumber;
    }

    public Integer getTest1() {
        return test1;
    }

    public void setTest1(Integer test1) {
        this.test1 = test1;
    }

    public Integer getTest2() {
        return test2;
    }

    public void setTest2(Integer test2) {
        this.test2 = test2;
    }
}
最近下载更多
ivancolin  LV9 2019年11月5日
低调人  LV38 2019年2月23日
2985225214  LV10 2018年12月28日
lls_jiajia  LV9 2018年12月6日
Chrishi  LV4 2018年8月14日
sodkj123  LV15 2018年8月7日
走丢的小怪兽  LV8 2018年7月24日
1158756616  LV8 2018年7月13日
L12318  LV10 2018年7月4日
献gege  LV1 2018年6月20日
最近浏览更多
微信网友_6631309708414976  LV5 2023年12月10日
mxn0829  LV1 2023年8月1日
Sunsi12345  LV8 2022年6月8日
221231 2022年5月18日
暂无贡献等级
我只是一只小白兔  LV2 2021年11月5日
18641190912  LV2 2021年11月4日
那我懂你意思了  LV3 2021年8月5日
齐凌霄  LV7 2021年5月11日
aaa5849310  LV25 2021年3月5日
gshnlj  LV15 2020年10月14日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友