程序员

Spring 配置文件XML头部文件模板实例详解

作者:admin 2021-04-27 我要评论

普通spring配置文件模板: xml version="1.0" encoding="UTF-8" beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframew...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

普通spring配置文件模板:

<?xml version="1.0" encoding="UTF-8" ?>  
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns="http://www.springframework.org/schema/beans" 
   xsi:schemaLocation="http://www.springframework.org/schema/beans 
   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">  

</beans>

添加注解后的格式:

<?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:context="http://www.springframework.org/schema/context" 
   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">  

</beans>

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!


本文转载自网络,原文链接:https://m.jb51.net/article/111927.htm

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • 解密阿里云高效病原体基因检测工具

    解密阿里云高效病原体基因检测工具

  • 探秘!在阿里云做产品经理是怎样的体验

    探秘!在阿里云做产品经理是怎样的体验

  • 精彩回顾 | 阿里云 Serverless Develop

    精彩回顾 | 阿里云 Serverless Develop

  • 为什么SOFA RPC调用30s还不超时?

    为什么SOFA RPC调用30s还不超时?