![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
柯莹
希望我这颗小星球能够变得更加成熟,更加strong,我要做计算界女汉子!!!
展开
-
@Repository、@Service 和 @Controller解释
Spring 2.5 中除了提供 @Component 注释外,还定义了几个拥有特殊语义的注释,它们分别是:@Repository、@Service 和 @Controller。在目前的 Spring 版本中,这 3 个注释和 @Component 是等效的,但是从注释类的命名上,很容易看出这 3 个注释分别和持久层、业务层和控制层(Web 层)相对应。虽然目前这 3 个注释和 @Componen转载 2015-07-11 16:54:59 · 319 阅读 · 0 评论 -
SpringMvc与Struts2的区别
最新学习了SpringMvc,确实比ssh要容易上手许多。 首先,springmvc的控制器要比struts的好一些。原因在于struts本身需要使用scope(单例多例模式)来限制对象;而springmvc则本身已经定义了为单例模式。所以不用担心线程冲突的问题。好比说: public class A{ private int m; public void disp(int a原创 2015-07-13 15:02:27 · 456 阅读 · 0 评论