通过模拟邮件的发送,说明Spring的事件监听机制事件类 1 package org.zln.module_chapter2.event; 2 3 import org.springframework.context.ApplicationContext; 4 import org.springf....
分类:
编程语言 时间:
2015-07-05 23:48:30
阅读次数:
153
下面是applicationContext.xml的配置: <?xml?version="1.0"?encoding="UTF-8"?>
<beans?xmlns="http://www.springframework.org/schema/beans"
????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc...
分类:
其他好文 时间:
2015-07-02 14:15:18
阅读次数:
120
用注解来向Spring容器注册Bean。 ? 需要在applicationContext.xml中注册: 1:@Repository 标注在持久层,即dao,用于标注数据访问。 2:@Service 标注在业务层,即service,用于标注业务逻辑。 3:@Controller...
分类:
编程语言 时间:
2015-07-01 23:48:28
阅读次数:
354
1:首先配置线程池(在spring配置文件中配置,我是在applicationContext.xml中配置的) <!--?异步线程池?-->
<bean?id="taskExecutor"
??????class="org.springframework.scheduling.concurrent.ThreadPo...
分类:
编程语言 时间:
2015-07-01 14:23:34
阅读次数:
217
Spring的IOC容器——Applicationcontext...
分类:
编程语言 时间:
2015-07-01 10:15:27
阅读次数:
209
用注解来向Spring容器注册Bean。需要在applicationContext.xml中注册:1:@Repository 标注在持久层,即dao,用于标注数据访问。2:@Service 标注在业务层,即service,用于标注业务逻辑。3:@Controller 标注在控制层。4:@Compon...
分类:
编程语言 时间:
2015-07-01 09:49:32
阅读次数:
150
(续)删除Hibernate配置文件的写法:在applicationContext.xml中添加数据库操作的相关配置: true org.hibernate.dialect.MySQLDiale...
分类:
其他好文 时间:
2015-06-30 12:16:44
阅读次数:
84
1、在applicationContext.xml文件中配置properties文件 classpath:jdbc.properties classpath:sysconfig.propert...
分类:
编程语言 时间:
2015-06-29 19:54:44
阅读次数:
160
applicationContext-security.xml
<logout?invalidate-session="true"??
logout-success-url="/login.html"??
logout-url="/j_spring_security_logout"/> applicationContext-security.xml : ? ? ? ...
分类:
编程语言 时间:
2015-06-29 18:09:03
阅读次数:
153
当我们需要使用BeanPostProcessor时,直接在Spring配置文件中定义这些Bean显得比较笨拙,例如: 使用@Autowired注解,必须事先在Spring容器中声明AutowiredAnnotationBeanPostProcessor的Bean: 使用 @Required注解,.....
分类:
移动开发 时间:
2015-06-29 16:14:11
阅读次数:
134