(javaEE)Spring在整个项目中如何充当黏合器?

大神在哪里
2025-05-05 02:27:08
推荐回答(4个)
回答1:

Typically web application uses the following path

view >> controller >> service >> domain

Spring

It has a powerful web-Tier infrastructure

Handler Mapping (It chooses which Controller should handle the request)
View resolver (It chooses which View should render the response)
It can be used for large applications
Powerful data-binding
Spring 3.0 supports Annotation-based Controller (JSR 303 - Bean Validation, coming soon)
But i still not use Spring 3.0 because

By using (and extending when needed) MultiActionController, i can get convention over configuration without no xml settings to define your Controller (You just need to set up your MultiActionController as @Component)
SimpleFormController provides similar behavior found in Spring 3.0 annotation based controller
...

About The learning path, i think both are similar.

回答2:

在SSH项目中,spring的作用相当于将Struts和Hibernate连接起来,将两个没有关系的框架的特点,方法,Action都放在spring的配置文件中,使它们建立关系,取各自所长。

还有你问问题都没有悬赏积分难怪没人高兴回答。

回答3:

我鹏 来我宿舍我告诉你啊

回答4:

窝棚,好高大上啊!俺乡下人都没听过