spring-Spring getBean时出错 求解

问题描述

Spring getBean时出错 求解

解决方案

后面的UserService.class就不用加引号啦。

解决方案二:

UserService service = ac.getBean("userservice",UserService.calss);

时间: 2024-08-18 04:20:18

spring-Spring getBean时出错 求解的相关文章

使用maven进行 spring mvc项目管理时出错

问题描述 使用maven进行 spring mvc项目管理时出错 初学maven和spring,昨天跟着教程自己搭建了一个javaweb,然后配置了spring和maven,在pom.xml进行spring依赖的时候,发现myeclipse报了很多错误刚开始是以为没有对spring进行配置的缘故,后来在对spirng进行配置之后刷新工程错误依然存在. log4jlog4j1.2.17compile junitjunit3.8.1test org.springframeworkspring-con

spring mvc-springmvc+mybatis tomcat加载时出错,JUNIT测试通过

问题描述 springmvc+mybatis tomcat加载时出错,JUNIT测试通过 springmvc+mybatis tomcat加载时出错,JUNIT测试通过,就是tomcat起不来,请各位大神帮帮忙 十月 25, 2015 6:18:41 下午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 十月 25

spring依赖注入测试时出错

问题描述 spring依赖注入测试时出错 错误如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'analysisService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationExcepti

关于spring mvc注解的使用,运行tomcat时出错

问题描述 关于spring mvc注解的使用,运行tomcat时出错 spring-mvc.xml的代码 <!--开启注解扫描 --> <context:component-scan base-package="com.tarena"/> <!--开启MVC注解扫描 --> <mvc:annotation-driven/> <!--定义视图解析器ViewResolver --> <bean id="viewRe

spring和hibernate整合出错,请大神帮忙解决,谢谢

问题描述 spring和hibernate整合出错,请大神帮忙解决,谢谢 <!-- Hibernate和spring整合的配置 配置SessionFactory --> <!-- 指定hibernate的配置文件位置 --> <!-- 配置c3p0数据库连接池 --> <!--通过反射设置set方法--> <!-- 数据连接信息 --> <!-- 其他配置 --> <!-- 初始化时获取三个连接,取值应在minPoolSize与

请教spring 3+mybatis整合出错问题

问题描述 请教spring 3+mybatis整合出错问题 spring 3+mybatis3+spring security整合,我的包和层次结构如下:采用的是按照模块分层, 每层有dao,sevrice,web三个目录,所有的实体类放在model文件夹中 security包中,有dao,service,web三个目录,其中 SecurityDao.java @MyBatisDao public interface SecurityDao extends BaseMapper { // 获得群

spring mybatis集成,出错不回滚

问题描述 spring mybatis集成,出错不回滚 配置文件,spring-servelt.xml <!-- 加载Controller --> <context:component-scan base-package="com"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"

c-使多个数移位输出,应用指针时出错,求解

问题描述 使多个数移位输出,应用指针时出错,求解 要达到的目的是输入n = 5, a = {1,2,3,4,5},m = 3时能输出 4 5 1 2 3 可在对指针所指的值赋值时出错,是语法问题吗?代码见下: /*移位m个整数*/ #include <stdio.h> #include <stdlib.h> int* a = 0, *a1 = 0; int* move(int* a,int n,int m); int main() { int n; printf("Ple

svn-SVN检出的项目没有spring,maven支持。。求解

问题描述 SVN检出的项目没有spring,maven支持..求解 图中的 ygf 项目和new_pro项目没有spring支持 解决方案 java项目转化为mavan项目 解决方案二: 提交pom文件了么.