RED-3611: Fixed parameter type of priorityMode
This commit is contained in:
parent
19014c683e
commit
cc26b21b1b
@ -2,6 +2,7 @@ package com.iqser.red.service.redaction.v1.server;
|
|||||||
|
|
||||||
import com.iqser.red.commons.spring.DefaultWebMvcConfiguration;
|
import com.iqser.red.commons.spring.DefaultWebMvcConfiguration;
|
||||||
import com.iqser.red.service.redaction.v1.server.client.RulesClient;
|
import com.iqser.red.service.redaction.v1.server.client.RulesClient;
|
||||||
|
import com.iqser.red.service.redaction.v1.server.queue.MessagingConfiguration;
|
||||||
import com.iqser.red.service.redaction.v1.server.settings.RedactionServiceSettings;
|
import com.iqser.red.service.redaction.v1.server.settings.RedactionServiceSettings;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
|
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
|
||||||
@ -11,7 +12,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
|||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
|
|
||||||
@Import({DefaultWebMvcConfiguration.class})
|
@Import({DefaultWebMvcConfiguration.class, MessagingConfiguration.class})
|
||||||
@EnableFeignClients(basePackageClasses = RulesClient.class)
|
@EnableFeignClients(basePackageClasses = RulesClient.class)
|
||||||
@EnableConfigurationProperties(RedactionServiceSettings.class)
|
@EnableConfigurationProperties(RedactionServiceSettings.class)
|
||||||
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class})
|
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class})
|
||||||
|
|||||||
@ -1,15 +1,22 @@
|
|||||||
package com.iqser.red.service.redaction.v1.server.queue;
|
package com.iqser.red.service.redaction.v1.server.queue;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import org.springframework.amqp.core.Queue;
|
import org.springframework.amqp.core.Queue;
|
||||||
import org.springframework.amqp.core.QueueBuilder;
|
import org.springframework.amqp.core.QueueBuilder;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import com.iqser.red.service.redaction.v1.server.settings.RedactionServiceSettings;
|
||||||
|
import com.iqser.red.storage.commons.properties.StorageProperties;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
@EnableConfigurationProperties(RedactionServiceSettings.class)
|
||||||
public class MessagingConfiguration {
|
public class MessagingConfiguration {
|
||||||
|
|
||||||
public static final String REDACTION_QUEUE = "redactionQueue";
|
public static final String REDACTION_QUEUE = "redactionQueue";
|
||||||
@ -20,6 +27,7 @@ public class MessagingConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(prefix = "redaction-service", name = "priorityMode", havingValue = "false")
|
@ConditionalOnProperty(prefix = "redaction-service", name = "priorityMode", havingValue = "false")
|
||||||
public MessageReceiver messageReceiver(RedactionMessageReceiver redactionMessageReceiver){
|
public MessageReceiver messageReceiver(RedactionMessageReceiver redactionMessageReceiver){
|
||||||
|
log.info("Started in normal mode");
|
||||||
return new MessageReceiver(redactionMessageReceiver);
|
return new MessageReceiver(redactionMessageReceiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,6 +35,7 @@ public class MessagingConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(prefix = "redaction-service", name = "priorityMode", havingValue = "true")
|
@ConditionalOnProperty(prefix = "redaction-service", name = "priorityMode", havingValue = "true")
|
||||||
public PriorityMessageReceiver priorityMessageReceiver(RedactionMessageReceiver redactionMessageReceiver){
|
public PriorityMessageReceiver priorityMessageReceiver(RedactionMessageReceiver redactionMessageReceiver){
|
||||||
|
log.info("Started in priority mode");
|
||||||
return new PriorityMessageReceiver(redactionMessageReceiver);
|
return new PriorityMessageReceiver(redactionMessageReceiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user