public static String topicName; @Value("${activemq.topicName}") public void setTopicName(String topicName){ this.topicName = topicName; }
静态变量先声明后赋值,@Value注解写在set方法上
public static String topicName; @Value("${activemq.topicName}") public void setTopicName(String topicName){ this.topicName = topicName; }
静态变量先声明后赋值,@Value注解写在set方法上
转载于:https://www.cnblogs.com/lensener/p/8602701.html