可以混合用。文档有说明:

Spring can accommodate both styles and even mix them together.

混合用的话,有个先后顺序,xml配置会覆盖annotation。原文:

Annotation injection is performed before XML injection, thus the latter configuration will override the former for properties wired through both approaches.

也就是说对于同一个bean  不能注解完成部分属性的设定  xml完成部分属性的设定

xml会覆盖注解

最新文章

  1. 对datatable操作,查询
  2. Javascript高级程序设计——BOM(浏览器对象模型)
  3. 【VBA】批量插入图片
  4. SharedPreferences 轻型的数据存储方式
  5. 初次学习Linux需要注意的
  6. POJ 1173 Find them, Catch them
  7. js获取浮动(float)元素的style.left值为空的解决办法
  8. Centos 7 ip查看问题
  9. 芝麻HTTP:Python爬虫进阶之Scrapy框架安装配置
  10. 【BZOJ 4652】【NOI 2016】循环之美
  11. Nginx的正向代理与反向代理详解
  12. 下载、安装 SQL server 2012,一步一步教你安装、激活sql server2012数据库 ,附有数据库安装包
  13. Windows Server 2016-Active Directory复制概念(二)
  14. Android设备一对多录屏直播--(UDP组播连接,Tcp传输)
  15. string通过逗号分割不用split方法
  16. #20175120彭宇辰 java第四周总结
  17. CentOS7.2配置Hadoop2.6.5
  18. MVC打印表格,把表格内容放到部分视图打印
  19. windows 添加打印机
  20. Composer 扩展包安装方法

热门文章

  1. 教大家如何在word 2007中同时打出对齐上下标以及字母头上有波浪线(非编辑器)
  2. k-means聚类学习
  3. object sender, LinkLabelLinkClickedEventArgs e 参数解释
  4. 搭建nginx流媒体服务器(支持HLS)
  5. ant design pro (十六)advanced 权限管理
  6. javascript 闭包 通俗解释
  7. numpy.argmin 使用
  8. AutoFac文档5(转载)
  9. 简单的并发测试工具 ab.exe ab.zip可下载 -摘自网络
  10. 让gcc和gdb支持intel格式的汇编