码迷,mamicode.com
首页 >  
搜索关键字:applicationcontext    ( 2092个结果
applicationContext.xml详解
想必用过Spring的程序员们都有这样的感觉,Spring把逻辑层封装的太完美了(个人感觉View层封装的不是很好)。以至于有的初学者都不知道Spring配置文件的意思,就拿来用了。所以今天我给大家详细解释一下Spring的applicationContext.xml文件。Ok,还是通过代码加注释的...
分类:移动开发   时间:2015-06-29 14:47:01    阅读次数:155
Spring注解
用注解来向Spring容器注册Bean。需要在applicationContext.xml中注册:1:@Repository 标注在持久层,即dao,用于标注数据访问。2:@Service 标注在业务层,即service,用于标注业务逻辑。3:@Controller 标注在控制层。4:@Compon...
分类:编程语言   时间:2015-06-27 11:21:09    阅读次数:134
druid连接池配置
本人使用的时springMVC框架,以下是我的配置:step1,配置数据源(applicationContext-resource.xml中): 其中数据来自config.properties:#数据库配置url=jdbc:oracle:thin...
分类:其他好文   时间:2015-06-26 17:32:02    阅读次数:125
Spring的注解积累
用注解来向Spring容器注册Bean。需要在applicationContext.xml中注册:1 如:在base-package指明一个包 也可以在中指定多个包,如: ==========1:@Repository 标注在持久层,即dao,用于标注数据访问。2:@Service 标注在业务...
分类:编程语言   时间:2015-06-25 22:41:46    阅读次数:147
SpringMVC+Ibatis事务不回滚的问题
在使用SpringMvc的时候,大多数人都会遇到事务不回滚的问题。其实事务在Spring里面使用起来很简单,只要配置正确了,知识一个标签的事。 下面我就给大家说一下我是怎么解决这个问题的。 一、配置扫描标签时 二、applicationContext.xml里面关...
分类:编程语言   时间:2015-06-24 18:32:57    阅读次数:170
【面试】【Spring常见问题总结】【06】
51、spring中的applicationContext.xml能不能改为其他名字 ContextLoaderListener是一个ServletContextListener, 它在你的web应用启动的时候初始化。缺省情况下,它会在WEB-INF/applicationContext.xml文件找Spring的配置。 你可以通过定义一个元素名字为”contextConfigLocation”...
分类:编程语言   时间:2015-06-24 09:21:47    阅读次数:148
spring controller中@Value取不到applicationContext.xml中加载配置文件的问题
原因还未查证:http://sunjun041640.blog.163.com/blog/static/256268322014127113844746/在使用spring mvc时,实际上是两个spring容器:1,dispatcher-servlet.xml 是一个,我们的controller就...
分类:移动开发   时间:2015-06-23 17:24:03    阅读次数:146
Spring
1.什么是Spring(面试题)Spring是一个容器,可以接管各个层次的Bean(action/domain/pojo/javabean),并且可以配置bean与bean之间的关系在java代码里使用bean只需要用ApplicationContext 的getBean(配置文件里bean的id)...
分类:编程语言   时间:2015-06-23 17:12:15    阅读次数:136
基于Spring框架的Shiro配置
一、在web.xml中添加shiro过滤器 Xml代码 shiroFilterorg.springframework.web.filter.DelegatingFilterProxyshiroFilter/*二、在Spring的applicationContext.xml中添加shiro配置1、添加...
分类:编程语言   时间:2015-06-23 17:08:24    阅读次数:122
spring 4.0 JUnit简单的Controller测试
比Dao和Service的测试稍微复杂一点。还是先写一个BasicWebTest用来总体配置:@WebAppConfiguration@ContextConfiguration(locations= {"classpath:spring/applicationContext.xml","classp...
分类:编程语言   时间:2015-06-23 15:13:55    阅读次数:527
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!