spring使用注解时配置文件的配置
来源:互联网 发布:将字符串转换为json 编辑:程序博客网 时间:2024/04/30 07:31
<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.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"><!-- 通过注解的方式 --><context:annotation-config/><bean id="personDaoBean" class="cn.axin.dao.impl.PersonDaoBeanImpl"/><bean id="personServiceBeanImpl" class="cn.axin.service.impl.PersonServiceBeanImpl"/></beans>
特别注意:http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
的位置顺序。否则xml文件的提示功能可能出现问题,还有可能出现无法成功运行的情况,报:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from class path resource [beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.
0 0
- spring使用注解时配置文件的配置
- spring使用注解时配置文件的写法
- spring使用注解时配置文件的写法
- hibernate3使用注解,spring配置文件applicationContext.xml的配置
- 使用注解,实现ssh项目中spring配置文件的零配置,约定优于配置
- Hibernate注解配置 在Spring的配置文件里写法
- Hibernate注解配置 在Spring的配置文件里写法
- Hibernate注解配置 在Spring的配置文件里写法
- 使用注解配置spring
- 使用注解配置spring
- Spring 的配置文件简化与注解的使用
- 如何spring使用@value注解读取配置文件的值
- spring使用注解@PostConstruct的xml配置
- CXF的Spring注解配置及使用
- CXF的Spring注解配置及使用
- spring 中配置文件配置注解方法
- Spring的注解配置
- spring的注解 配置
- c++ scanf sscanf ssprintf gets 逗号输入 不确定行列长度 旧事重提
- A. Mashmokh and Numbers
- 完成一个商品的购买
- c2java 第5篇 栈和中缀表达式的直接计算
- 您的计算机上的 Office 2003 安装已损坏,安装程序无法继续。请删除或修复 Office 2
- spring使用注解时配置文件的配置
- 使用JavaMail发送邮件
- C# 通过WebService方式 IIS发布网站 上传文件到服务器的虚拟机下 详尽方法
- 关于循环设计
- 方法中的if与return
- poj1321
- 真队魂 : 杰拉德!!!
- 循环语句中的if else 结构里面如何使用break语句?
- 在Handler中使用Session