我的應用程序運行得很好Mac OS X上彈簧工具套件中使用Tomcat 7和JDK 7u6的Mac OS X相同的應用程序給我的錯誤,當我在RHEL 6中運行它與Jdk7u6Spring應用程序給出了rg.springframework.beans.factory.UnsatisfiedDependencyException當在Linux上運行?
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiAwareAuthenticationEntryPoint' defined in class path resource [spring-security.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?
這裏是相關豆參考/ definiton
<beans:bean id="apiAwareAuthenticationEntryPoint" class="com.example.ApiAwareAuthenticationEntryPoint">
<beans:constructor-arg name="loginUrl" value="/login" type="java.lang.String" index="0" />
</beans:bean>
下面是代碼
public class ApiAwareAuthenticationEntryPoint extends LoginUrlAuthenticationEntryPoint
{
public ApiAwareAuthenticationEntryPoint(String loginUrl)
{
super(loginUrl);
}
什麼引起這樣的問題的一個片段?
你能解決這個問題嗎? –
@Varun我用顯式的xml配置工作,從來沒有真正找出原因。 – ams