摘要: SpringMVC的四个基本注解annotation(控制层,业务层,持久层) -- @Component、@Repository @Service、@ControllerSpringMVC中四个基本注解:@Component、@Repository@Service、@Controller看字面含义,很容易却别出其中三个:@Controller控制层,就是我们的action层@Service业务逻辑层,就是我们的service或者manager层@Repository持久层,就是我们常说的DAO层而@Component(字面意思就是组件),它在你确定不了事哪一个层的时候使用。其实,这四个注解的 阅读全文
posted @ 2013-11-20 13:53 miss you 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 转自:http://jinnianshilongnian.iteye.com/blog/1698916 阅读全文
posted @ 2013-11-20 13:31 miss you 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 参考见:http://blog.csdn.net/wendellup/article/details/8352090今天在使用springmvc 控制器跳转到新增页面时,报错了:java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'command' available as request attribute at org.springframework.web.servlet.support.BindStatus.(BindStatus.jav 阅读全文
posted @ 2013-11-20 11:19 miss you 阅读(9641) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/archie2010/archive/2011/05/06/2038792.htmlSpringMVC与Ibatis框架整合所使用版本Ibatis 2.3.4Spring 3.0web.xml characterEncodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 ... 阅读全文
posted @ 2013-11-20 10:13 miss you 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.blogjava.net/pengo/archive/2010/11/28/339229.html弃用了struts,用spring mvc框架做了几个项目,感觉都不错,而且使用了注解方式,可以省掉一大堆配置文件。本文主要介绍使用注解方式配置的spring mvc,之前写的spring3.0 mvc和rest小例子没有介绍到数据层的内容,现在这一篇补上。下面开始贴代码。文中用的框架版本:spring 3,hibernate 3,没有的,自己上网下。web.xml配置:s3h3contextConfigLocationclasspath:applicationCont 阅读全文
posted @ 2013-11-20 09:31 miss you 阅读(226) 评论(0) 推荐(0) 编辑