xx.xyz.url=http://www.xxx.com/
xx.xyz.name=zhangsan
xx.xyz.clientId=1234456
xx.xyz.clientSecret=miyao
config配置文件
package com.test.sso.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@PropertySource("classpath:test.properties")
@ConfigurationProperties(prefix = "xx.xyz") //配置文件属性统一前缀
@Data
public class HuanXinConfig {
private String url;
private String name;
private String clientId;
private String clientSecret;
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)