在集成应用程序中,我定义了一个简单的网关,如下所示:
@MessagingGateway
@Profile(value = { "export" })
public interface ExportingOutboundGateway {
@Gateway(requestChannel = "exportChannel")
void send(RequestInfo request);
}
如果我使用在application.properties中声明的 spring.profiles.active = export 来执行此Spring Boot应用程序,则无法创建网关Bean
网关bean的定义是否有错误?如何解决?
答案 0 :(得分:1)
这是.data
txt1: .asciiz "Please enter apositive integer (negative integer to exit) : "
txt2: .asciiz "\nThe maximum value is : "
txt3: .asciiz "\nThe minimum value is : "
txt4: .asciiz "\nThe average is : "
txt5: .asciiz " with remainder : "
.text
.globl main
main:
addi $s0, $zero, 0
loop:
la $a0, txt1
li $v0, 4
syscall
li $v0, 5
syscall
bltz $v0, average
add $s0, $v0, 0
add $t0, $t0, 1
add $t3, $t3, $s0
beq $t0, 1, first
blt $s0, $t1, min
bgt $s0, $t2, max
first:
add $t1, $s0, 0
add $t2, $s0, 0
j loop
min:
add $t1, $s0, 0
j loop
max:
add $t2, $s0, 0
j loop
average:
div $t3, $t0
mflo $t7
mfhi $t6
print:
la $a0, txt2
li $v0, 4
syscall
add $a0, $t2, 0
li $v0, 1
syscall
la $a0, txt3
li $v0, 4
syscall
add $a0, $t1, 0
li $v0, 1
syscall
la $a0, txt4
li $v0, 4
syscall
add $a0, $t7, 0
li $v0, 1
syscall
exit:
li $v0, 10
syscall
中的错误。当我们扫描IntegrationComponentScanRegistrar
接口时,我们不会在应用程序上下文中使用@MessagingGateway
,而内部Environment
仅使用默认接口,而我们没有该活动配置文件。>
作为一种解决方法,我建议使用以下方法:
ClassPathScanningCandidateComponentProvider
有关此事的JIRA:https://jira.spring.io/browse/INT-4565