一、工具类中使用beanIService service = (IService)ContextLoader.getCurrentWebApplicationContext().getBean(serviceBeanName);View Code
分类:
编程语言 时间:
2014-06-18 10:13:46
阅读次数:
216
要把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
自己写的开发平台ssmy_m 与代码生成 ,strust2 mybatis spring maven jquery jqgrid jqueryui
有问题请留言,或QQ110146324
SVN上的代码基础功能已经都有了.美工没弄,有需要的自己改吧.
在/ssmy_m/src/main/webapp/common/include_com.jsp里引用.否则代码生成会有影响...
分类:
编程语言 时间:
2014-06-18 08:03:58
阅读次数:
299
源码学习第一天:
org.springframework.beans 和org.springframework.context 包是ioc 容器的基础包。
BeanFactory 接口 :负责通过配置机制管理任何类型对象。
ApplicationContext 接口: 继承BeanFactory
可以和aop ,消息资源处理(国际化),事件发布集成。
webApplicat...
分类:
编程语言 时间:
2014-06-18 07:59:23
阅读次数:
195
在练习spring项目的过程中,出现了如下异常信息:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.context.support.AbstractApplicationContext.(Abstrac...
分类:
编程语言 时间:
2014-06-18 07:15:20
阅读次数:
236
依赖坐标与本地仓库存储
org.springframework
spring-core
3.0.7.RELEASE
本地仓库存储
仓库分类:
本地仓库:
F:\maven\repos
中央仓库
...
分类:
其他好文 时间:
2014-06-18 06:27:57
阅读次数:
312
1. 提供对应的构造方法
//构造器注入
public class Bean6 {
private String name;
private Integer age;
// 服务于构造器注入使用
public Bean6(String name, Integer age) {
super();
this.name = name;
this.age = age;
...
分类:
编程语言 时间:
2014-06-18 06:15:08
阅读次数:
199
注入引用类型:对象
必须保障该对象以Bean形式存在于IoC容器,受Spring控制
1. 提供对应要注入的属性
public class Bean2User {
public void Test() {
System.out.println("bean2 use obj ...");
}
}
2. 为每个要注入的属性提供对应的标准封装se...
分类:
编程语言 时间:
2014-06-18 00:29:00
阅读次数:
311
spring-mybatis-data-common-2.0新增分表机制,在1.0基础上做了部分调整.基于机架展示分库应用数据库分表实力创建create table tb_example_1( id bigint primary key auto_increment , eId bigint, .....
分类:
编程语言 时间:
2014-06-18 00:07:38
阅读次数:
317