- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我总是得到:
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot resolve reference to bean 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0' while setting constructor argument with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0': Cannot resolve reference to bean 'org.springframework.security.authentication.ProviderManager#0' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.ProviderManager#0': Cannot resolve reference to bean 'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.security.authentication.ProviderManager' to required type 'org.springframework.security.core.userdetails.UserDetailsService' for property 'userDetailsService'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.security.authentication.ProviderManager] to required type [org.springframework.security.core.userdetails.UserDetailsService] for property 'userDetailsService': no matching editors or conversion strategy found
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:138)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
spring-security.xml
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<security:http auto-config="true" access-denied-page="/WEB-INF/view/error/access-denied.jsp">
<security:intercept-url pattern="/**" access="ADMINISTRATOR" />
<security:intercept-url pattern="/resources/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/index*" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:form-login login-page="/index" default-target-url="/home" authentication-failure-url="/error" />
</security:http>
<bean id="userDetailsService" class="com.syncbro.clinic.service.impl.UserDetailsServiceImpl" />
<bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
<property name="userDetailsService" ref="userDetailsService" />
</bean>
<bean id="providerManager" class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref local="daoAuthenticationProvider" />
</list>
</property>
</bean>
<security:authentication-manager>
<security:authentication-provider user-service-ref="providerManager">
<security:password-encoder hash="sha-256" />
</security:authentication-provider>
</security:authentication-manager>
UserDetailsServiceImpl.java
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service("userDetailsService")
public class UserDetailsServiceImpl implements UserDetailsService {
@Autowired private UserDao userDao;
@Autowired private Assembler assembler;
@Override
@Transactional(readOnly = true)
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
User user = userDao.findByUserName(username);
if(user == null)
throw new UsernameNotFoundException("[Login] User : " + username + " not found!");
return assembler.assembleUser(user);
}
}
最佳答案
这是我认为的问题:
<security:authentication-provider user-service-ref="providerManager">
您传递了一个 ProviderManager
ref,它看起来像是预期的 UserDetailsService
。 (即使这不是发生错误的地方,异常消息也清楚地表明这是发生了什么……某处。)
关于java - 属性 'userDetailsService' : no matching editors or conversion strategy found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14300260/
有没有人有嵌套 Intent 的好例子,尤其是在 #yes 和 #no 是子节点的情况下。我得到的情况是 API 返回的是 Intent 值,但输出文本来自“Anything else”! 最佳答案
我知道您可以转到 Watson Conversation 界面,右键单击工作区,然后下载工作区的 JSON,其中包含意图,如下所示:Is there any way to export intents
我能否在 Watson Conversation API 的对话流中使用节点条件中的意图置信度评级? 最佳答案 要做到这一点,请创建一个条件来寻找您的意图,然后检查置信度。 你会拥有的示例条件 #te
我找到了很多关于这个错误的帖子,但我可以找到克服它的方法。这是触发错误的代码: void main(){ float f{1.3}; } 为什么在初始化列表中没有像其他变量那样发生转换?例如,
我有以下代码。 #include using namespace std; class Base { public: virtual int f(){coutf(); ///base
Visual C++ 2017 和 gcc 5.4 产生 conversion from 'const unsigned char' to 'const float' requires a narro
我正在为 PIC18F2420 使用带有 xc8 1.35 编译器的 MPLABX 3.20,我收到了两个我不理解的奇怪警告: 这是生成警告的源代码之一 9 void write(Pin _Pin,
我正在尝试在 win32 API(无 mfc)上编写一些直接的 c++。有了这个更现代的 c++ 编译器,我得到: 警告 C4838:从“unsigned int”到“int”的转换需要收缩转换 它发
此代码采用用户输入(字符 C、T、B)和(int 0-24 和 0-60)来计算 parking 成本关于用户输入的车辆类型。 我怀疑错误发生在函数 charged 中,因此我无法在收到此错误的最后一
为什么在使用 tuple 或 Tuple 转换向量时会得到以下不同的结果? julia> a = [1, 2, 3] 3-element Vector{Int64}: 1 2 3 julia> tup
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 8年前关闭。 Improve t
我正在开发一个文件共享网站,我需要一种方法来对上传的文档进行截图。 该站点将支持多种文件格式,从纯文本到办公文档(doc、xls、ppt...)、视频(mpeg、avi...)、图像(jpg、gif、
在 VHDL 中是否有将整数类型对象转换为实数类型的通用转换函数? 这是针对测试平台的,因此可综合性不是问题。 最佳答案 您可以将整数转换为实数,如下所示: signal i: integer; si
如何在 Ocaml 中将字符串选项数据类型转换为字符串? let function1 data = match data with None -> "" | Some str -> s
我已经在 VHDL 中编写了一个算法,但是我有一条消息,我不明白“sra/sla 在这种情况下不能有这样的操作数。”。请问有什么帮助吗? library ieee; use ieee.std_logi
我经常需要将数据从一种类型转换为另一种类型,然后进行比较。一些运算符会先转换为特定类型,这种转换可能会导致效率损失。例如,我可能有 my $a, $b = 0, "foo"; # initial va
假设我在 IBM Watson 中配置了一个对话服务,可以识别以单词和片段形式给出的数字。例如,如果我有号码 1320 , 可以发送为 thirteen twenty或 thirteen two ze
也许我错过了一些显而易见的事情...在整个文档中,我似乎都认为Kotlin具有各种类型的序列,这些序列不能互操作。即使复制序列可能效率不高–当我需要将其作为语义相同但不同的类型传递给函数时,这也无济于
在我的Linux终端中,我想要使用QTcpSocket从qt运行以下“对话”: S user@domain:~ $ netcat 1.1.1.2 9230 R HELO SOME MORE I
我有一个模板函数,其中枚举类型转换为它的底层类型,工作正常,但我写了一个重载,它应该接受一个整数并返回它自己,它给我一个错误,指出 int 不是枚举类型。在我的模板中,这应该已经被过滤掉了。怎么了?
我是一名优秀的程序员,十分优秀!