public static String topicName; @Value("${activemq.topicName}") public void setTopicName(String topicName){ this.topicName = topicName; }
静态变量先声明后赋值,@Value注解写在set方法上