叶松
2023-11-29 8428bf7e11fe22cdccbe2c9ccf76cf090c05996c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.thhy.general.config.mq;
 
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
@Configuration
@ConditionalOnProperty(prefix = "rocketmq",value = "enable",havingValue = "true")
@ConfigurationProperties(prefix = "rocketmq")
@Data
public class MqConfig {
 
    @Value("${rocketmq.name-server}")
    private String nameServer;
 
 
}