ApplicationContext.xml配置文件

简介:
[html]  view plain  copy
 print ?
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"  
  4.     xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"  
  5.     xsi:schemaLocation="http://www.springframework.org/schema/beans   
  6.     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd   
  7.     http://www.springframework.org/schema/tx   
  8.     http://www.springframework.org/schema/tx/spring-tx-3.0.xsd   
  9.     http://www.springframework.org/schema/jee   
  10.     http://www.springframework.org/schema/jee/spring-jee-3.0.xsd   
  11.     http://www.springframework.org/schema/context   
  12.     http://www.springframework.org/schema/context/spring-context-3.0.xsd"  
  13.     default-lazy-init="true">  


如果要加入aop等其他配置加上就行,例如加上aop的

[html]  view plain  copy
 print ?
  1. xmlns:aop="http://www.springframework.org/schema/aop"  
[html]  view plain  copy
 print ?
  1. http://www.springframework.org/schema/aop   
  2. http://www.springframework.org/schema/aop/spring-aop-3.0.xsd   

default-lazy-init延迟加载,必须设为true,不然巨卡。
目录
相关文章
|
9月前
|
安全 Java Linux
一文了解 Maven 的 settings.xml 配置文件
一文了解 Maven 的 settings.xml 配置文件
1724 0
|
4月前
|
XML Java 数据格式
Spring从入门到入土(xml配置文件的基础使用方式)
本文详细介绍了Spring框架中XML配置文件的使用方法,包括读取配置文件、创建带参数的构造对象、使用工厂方法和静态方法创建对象、对象生命周期管理以及单例和多例模式的测试。
183 7
Spring从入门到入土(xml配置文件的基础使用方式)
|
2月前
|
XML Java 数据格式
使用idea中的Live Templates自定义自动生成Spring所需的XML配置文件格式
本文介绍了在使用Spring框架时,如何通过创建`applicationContext.xml`配置文件来管理对象。首先,在resources目录下新建XML配置文件,并通过IDEA自动生成部分配置。为完善配置,特别是添加AOP支持,可以通过IDEA的Live Templates功能自定义XML模板。具体步骤包括:连续按两次Shift搜索Live Templates,配置模板内容,输入特定前缀(如spring)并按Tab键即可快速生成完整的Spring配置文件。这样可以大大提高开发效率,减少重复工作。
使用idea中的Live Templates自定义自动生成Spring所需的XML配置文件格式
|
8月前
|
XML Java 数据库连接
MyBatis入门——MyBatis XML配置文件(3)
MyBatis入门——MyBatis XML配置文件(3)
189 6
|
4月前
|
XML Java 应用服务中间件
tomcat学习一:tomcat 目录及配置文件学习 server.xml 等
这篇文章是关于Apache Tomcat服务器的目录结构、配置文件(特别是server.xml)的详细介绍和学习指南。
172 0
tomcat学习一:tomcat 目录及配置文件学习 server.xml 等
|
4月前
|
XML 存储 JSON
framework 的配置文件在.netcore里面不能用怎么处理?在.netcore中创建.xml配置文件
framework 的配置文件在.netcore里面不能用怎么处理?在.netcore中创建.xml配置文件
45 0
|
4月前
|
安全 内存技术
【文件上传-配置文件】crossdomain.xml跨域策略配置文件上传
【文件上传-配置文件】crossdomain.xml跨域策略配置文件上传
|
7月前
|
存储 缓存 分布式计算
Hadoop配置文件core-site.xml
【7月更文挑战第17天】
405 2
Hadoop配置文件core-site.xml
|
7月前
|
XML 分布式计算 资源调度
Hadoop配置文件mapred-site.xml
【7月更文挑战第18天】
504 7
|
7月前
|
存储 机器学习/深度学习 分布式计算
Hadoop配置文件hdfs-site.xml
【7月更文挑战第17天】
447 5