关于spring+mybatis框架下包重命名的修改

用eclipse修改包完成后需要修改的地方:

1.spring配置文件(建议用全部替换的方式)

2.web.xml文件(建议用全部替换的方式)

3.如果开启了AOP需要在包内路径修改否则会报错:Caused by: java.lang.IllegalArgumentException: error Type referred to is not an annotation type: com$cdfahe$gms$aop$test$SystemServiceLog提示很明确,修改掉就可以

4.修改XXXMapper.xml文件不然会卡在这里:(也有人说类名重复也会卡,这个倒是没遇到过)

2014-11-01 11:43:31 [Thread-2] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1220b36: defining beans [propertyConfigurer,dataSource,transactionManager,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,txPointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,systemLogAspect,commonServiceImpl,drugServiceImpl,drugTypeServiceImpl,imageServiceImpl,newsServiceImpl,systemManageServiceImpl,userServiceImpl,aboutController,adminManageController,commController,drugController,DZImageController,loginController,indexController,kindEditorController,newsController,publicMsgController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,categoryMapper,commonMapper,drugMapper,drugtypeMapper,dzgpsinfoMapper,dzimagesMapper,dzuserMapper,newsMapper,userFhMapper]; root of factory hierarchy


修改完成后就能正常启动了







  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值