<bean class="com.xx.score.MqConfig" >
<property name="host" value="${xx.host}"/>
<property name="username" value="${xx.username}"/>
<property name="password" value="${xx.password}"/>
</bean>
public class MqConfig {
public static String host;
public static String username;
public static String password;
public MqConfig(){}
public MqConfig(String host, String username, String password) {
super();
this.host = host;
this.username = username;
this.password = password;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
转载于:https://my.oschina.net/vshcxl/blog/659215