有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

未创建<int:gateway>的java Spring集成网关代理bean

我有一个背景如下

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:int="http://www.springframework.org/schema/integration"
  xmlns:int-amqp="http://www.springframework.org/schema/integration/amqp"
  xmlns:rabbit="http://www.springframework.org/schema/rabbit"
  xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
        http://www.springframework.org/schema/integration/amqp
        http://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd
        http://www.springframework.org/schema/rabbit
        http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
        http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans.xsd">

  <int:gateway id="fooGateway" service-interface="com.foo.FooGateway"  />

</beans>

我的网关界面如下:

public interface FooGateway
{
    public void foo(String foo);
}

此上下文被导入到另一个上下文中,但GatewayProxyFactoryBean从未创建FooGatewayBean

我在GatewayProxyFactoryBean中设置了一个断点,我可以看到它没有为此接口创建代理


共 (1) 个答案

  1. # 1 楼答案

    org.springframework打开调试日志记录;bean创建过程会发出大量信息,包括读取特定配置文件的时间