Bil*_*erg 5 java spring spring-boot spring-cloud
在我的春季启动aws-cloud SNS http端点中,确认订阅不起作用。当SNS确认到来时,以下错误出现在我的应用程序中。错误:
[Request processing failed; nested exception is java.lang.IllegalArgumentException: Invoked method public abstract void org.springframework.cloud.aws.messaging.endpoint.NotificationStatus.confirmSubscription() is no accessor method!] with root cause
java.lang.IllegalArgumentException: Invoked method public abstract void org.springframework.cloud.aws.messaging.endpoint.NotificationStatus.confirmSubscription() is no accessor method!
at org.springframework.util.Assert.notNull(Assert.java:115) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
at org.spring
Run Code Online (Sandbox Code Playgroud)
我的控制器处理程序是:
@NotificationSubscriptionMapping
public void handleSubscriptionMessage( NotificationStatus status) throws IOException {
//Confirming SNS subscription
status.confirmSubscription();
}
Run Code Online (Sandbox Code Playgroud)
我的Pom包含以下内容:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-aws-messaging</artifactId>
<version>1.0.4.RELEASE</version>
</dependency>
<!-- For Spring AWS autoconfiguration-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-aws-autoconfigure</artifactId>
<version>1.0.4.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我按照此链接中的说明进行操作
您是否指定了自定义解析器:
<mvc:annotation-driven>
<mvc:argument-resolvers>
<ref bean="notificationResolver" />
</mvc:argument-resolvers>
</mvc:annotation-driven>
<aws-messaging:notification-argument-resolver id="notificationResolver" />
Run Code Online (Sandbox Code Playgroud)
另外,我看不到控制器映射,但在教程中有一个声明:
目前无法在方法级别定义映射 URL,因此 RequestMapping 必须在类型级别完成,并且必须包含端点的完整路径。
| 归档时间: |
|
| 查看次数: |
1181 次 |
| 最近记录: |