当HTTP基本身份验证保护mule时,为什么我的请求会被卡住?

时间:2013-08-07 09:49:45

标签: http authentication spring-security mule

我是mule的新手,我使用HTTP基本身份验证配置了mule安全性,如下所示:               

<spring:beans>
<!-- Setup authentication -->
  <ss:authentication-manager alias="authenticationManager">
   <ss:authentication-provider user-service-ref="appAuthService">
 </ss:authentication-provider>
</ss:authentication-manager>
<spring:bean id="appAuthService" class="org.jamee.demo.mule.rest.AppAuthService" />
<ss:global-method-security jsr250-annotations="enabled" />
</spring:beans>

<flow name="muleFlow1" doc:name="muleFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="0.0.0.0" port="8081" path="rest"
 doc:name="HTTP">
 <mule-ss:http-security-filter realm="mule-realm" /> 
</http:inbound-endpoint>
<jersey:resources doc:name="REST">
 <component class="org.jamee.demo.mule.rest.WeatherService" />
</jersey:resources>
</flow>

我在Mule Studio中调试时工作正常,但当我将其导出为zip包并将其放在app / mule-standalone-3.4.0中,并通过浏览器请求其余API时,它会提示我用户和密码,我输入正确的一个,它接受,但浏览器很忙,没有响应输出,似乎骡子卡住了。

当我删除:&lt; mule-ss:http-security-filter realm =“mule-realm”/&gt;时,它会立即响应正确的输出。

日志似乎正常:

INFO  2013-08-08 09:07:42,870 [WrapperListener_start_runner] org.mule.module.launcher.application.DefaultMuleApplication:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ New app 'demo.rest'                                      +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
八月 08, 2013 9:07:45 上午 com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.6 03/25/2011 01:14 PM'
INFO  2013-08-08 09:07:45,801 [WrapperListener_start_runner] org.mule.module.launcher.MuleDeploymentService:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Started app 'demo.rest'                                  +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO  2013-08-08 09:07:45,803 [WrapperListener_start_runner] org.mule.module.launcher.StartupSummaryDeploymentListener:

**********************************************************************
*            - - + APPLICATION + - -            * - - + STATUS + - - *
**********************************************************************
* demo.rest                                     * DEPLOYED           *
**********************************************************************

INFO  2013-08-08 09:07:45,806 [WrapperListener_start_runner] org.mule.module.launcher.MuleDeploymentService:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Mule is up and kicking (every 5000ms)                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1 个答案:

答案 0 :(得分:0)

抱歉,我仔细检查了代码,发现:我导入了一个错误的类:edu.emory.mathcs.backport.java.util.Arrays,当我改为:java.util.Arrays时,它运行正常! 我不确定edu.emory Arrays是如何实现的。

相关问题