public class FrontUserDetailsServiceImpl implements UserDetailsService{
@Resource(name = "memberServiceImpl")
private transient MemberService memberService;
@Autowired
@Qualifier("memberRoleServiceImpl")
private transient MemberRoleService memberRoleService; ................................web.xml<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" ><web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/spring_lshuigou_dependence.xml</param-value>
</context-param>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/member/manager/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>lshuigou</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:lshuigou-servlet.xml</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>Kaptcha</servlet-name>
<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>lshuigou</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Kaptcha</servlet-name>
<url-pattern>/kaptcha.jpg</url-pattern>
</servlet-mapping>
</web-app>
lshuigou-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- <context:component-scan annotation-config="true" base-package="com" /> -->
<context:component-scan annotation-config="true" base-package="com">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>@Resource(name = "memberServiceImpl")
private transient MemberService memberService;
@Autowired
@Qualifier("memberRoleServiceImpl")
private transient MemberRoleService memberRoleService;
这些东西就是注入不进来?MemberService 实例100%已经创建了!@Service("memberServiceImpl")
public class MemberServiceImpl implements MemberService.............Spring
解决方案 »
- 跪求大神!EHCache二级缓存问题!
- 如何用java实现直接读取tnsnames.ora中的参数?
- 用hibernate的时候 用哪个检索方式比较多?
- displaytag中如何加入radio或checkbox
- 和hibernate3.x配套的工具
- 请问会话BEAN里面的EntityBeanProvider,EntityBeanResolver有什么用的阿?可以不用吗?用和不用有什么区别阿?
- 快来要分!!!!散分行动!!!!随便提个小问题。
- 讨论:如何估算项目开发时间和费用?如何设计交友网站?
- 请教关于外网环境下附件丢失问题
- 求助,关于csdn贴代码问题!!
- 跟大家分享一个大数据实战教程资料
- 新手求助 hibernate继承关系的配置问题
你使用@Autowired,应该在spring_lshuigou_dependence.xml里定义bean,
比如 <bean id="memberRoleService" class="xxx.xxx.MemberRoleService" />