0

我是 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 包并将其放入 mule-standalone-3.4.0 的 app/ 并通过浏览器请求其余 API 时,它会提示我用户和密码,我输入正确的,它接受,但是浏览器很忙,没有响应输出,似乎骡子卡住了。

当我删除:<mule-ss:http-security-filter realm="mule-realm"/>时,它会立即响应正确的输出。

日志看起来很正常:

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)                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4

1 回答 1

0

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

于 2013-08-08T01:32:24.443 回答