jsf、spring注入
我用的jsf+spring依赖注入,在jsf 中配置注入使用spring中的bean时,找不到类的对象。。下面是face-config.xml
<?xml version='1.0' encoding='UTF-8'?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">
<application>
<variable-resolver> org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
</application>
这段代码是使用spring注入的bean对象。
<lifecycle>
<phase-listener>listener.PhaseListenerTest</phase-listener>
</lifecycle>
<managed-bean>
<managed-bean-name>usersBean</managed-bean-name>
<managed-bean-class>web.bean.UsersBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>UsersBiz</property-name>
<value>#{UsersBiz}</value>
</managed-property>
</managed-bean>
</faces-config>
但是,不知道为什么总是不行,下面是报的异常
我坚信配置没有问题,代码也是没有见问题的,我用的jsf版本是 RI1.1的版本,是不是版本太低了,还不支持spring注入?
求高人指点。。
2013/03/15-17:55:32 ERROR ApplicationImpl:260 - Managedbean usersBean could not be created Expression Error: Named Object: 'UsersBiz' not found.
javax.faces.el.EvaluationException: Expression Error: Named Object: 'UsersBiz' not found.
at com.sun.faces.config.ManagedBeanFactory.getScopeForSingleExpression(ManagedBeanFactory.java:998)
at com.sun.faces.config.ManagedBeanFactory.hasValidLifespan(ManagedBeanFactory.java:931)
at com.sun.faces.config.ManagedBeanFactory.evaluateValueBindingGet(ManagedBeanFactory.java:892)
at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:553)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:234)
at jsf spring servlet login --------------------编程问答-------------------- 下载个最新的试下,红色部分有空格? --------------------编程问答--------------------
下载了新版本也没用。。
补充:Java , Java EE