使用注解进行简化aop的配置
切点是run方法
Car.java
package com.lubby.bean;
import org.springframework.stereotype.Component;
@Component("car")
public class Car {
public void run(){
System.out.println("Car i...
分类:
编程语言 时间:
2014-06-18 12:17:12
阅读次数:
269
1.添加JAR包,出了Spring自身的Jar包还要一些依赖的JAR包,不然会报ClassNotFound。
Student.java
package com.lubby.bean;
import org.springframework.stereotype.Component;
@Component("student")
public class Student {
private ...
分类:
编程语言 时间:
2014-06-18 11:57:51
阅读次数:
176
要把struts2的action交给spring管理,这样spring才能帮struts2注入需要的的bean(一开始action是由struts初始化,所以想注入spring里面的bean是注入不了的)
struts2 的filter生成action的时候由spring管理
struts2向spring要action
struts2是主导(struts2有个插件,要action的时候向这个...
分类:
编程语言 时间:
2014-06-18 08:07:13
阅读次数:
196
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'articleDaoImpl': Injection of resou...
分类:
移动开发 时间:
2014-06-18 00:10:10
阅读次数:
923
Sun公司的内省API过于繁琐,所以Apache组织结合很多实际开发中的应用场景开发了一套简单、易用的API操作Bean的属性——BeanUtils,在Beanutil中可以直接进行类型的自动转换。BeanUtil工具包下载:1,登录http://commons.apache.org/beanuti...
分类:
编程语言 时间:
2014-06-18 00:08:17
阅读次数:
340
构造方法类Bean1
package com.hao947.bean;
public class Bean1 {
public Bean1() {
System.out.println("bean1...构造方法");
}
public void show(){
System.out.println("bean1...方法");
}
}
配置文件applicationCont...
分类:
编程语言 时间:
2014-06-17 23:12:43
阅读次数:
402
首先必须要了解客户端跳转和服务器端跳转的区别:
客户端跳转: response.sendRedict(String path),地址栏发生改变。不能传递request属性。
服务器端跳转: 地址栏不发生改变。能传递request属性。
request属性范围: 只有在服务器端跳转以后,所有设置的内容才会停留下来。
session属性范围: 不管是客户端跳转还是服务器端跳转,只要是是属性设...
分类:
编程语言 时间:
2014-06-17 22:27:29
阅读次数:
331
1.实例化spring容器和从容器获取Bean目标实例化Spring容器常用的两种办法:办法一:在类途径下寻觅配置文件来实例化容器[引荐运用]ApplicationContextctx=newClassPathXmlApplicationContext(newString[]{"beans.xml"});办法二:在文件体系途径下寻觅配置文件来实例化容器[这种办..
分类:
编程语言 时间:
2014-06-17 18:04:17
阅读次数:
187
TSSessionBroker是WindowsServer2008中的新特点,是用于终端服务的MicrosoftNetworkLoadBalancing更简单的一个替代。该特点并不局限于某些服务器,而是为二到五台服务器中心提供了极大价值。通过TSSessionBroker,新会话分布在整个中心任务最少的服务器上,这不但优化性能,同..
分类:
其他好文 时间:
2014-06-17 17:23:07
阅读次数:
499
大家空闲的时候可以学习下,一些项目还是经常能用到的。
1. 对图片的剪裁cropimage-master
http://stackoverflow.com/questions/18013406/is-com-android-camera-action-crop-not-available-for-android-jelly-bean-4-3
2. ImageLoader ...
分类:
移动开发 时间:
2014-06-17 16:37:19
阅读次数:
230