spring4 0比spring3 0多了哪些特性

時間 2021-12-30 00:27:14

1樓:棟暖殊

增加了@restcontroller annotation, 就是把@controller和@reponsebody打包了,省得大家再去每個方法上加一個@responsebody了。

新加了asyncresttemplate類,可以用來構建非同步呼叫的restful client, 具體用法看這兒:http://jinnianshilongnian.

iteye.com/blog/1989381,或者這兒:http:

//docs.spring.io/spring/docs/4.

0.0.release/spring-framework-reference/htmlsingle/#rest-async-resttemplate

spring4.0基於servlet3.0+版本開發,尤其是spring mvc的測試框架中的mock都是基於servlet3.

0包中的一些類的,因此使用時必須把相容servlet 3.0的包新增到classpath中。

為spring mvc應用增加了timezone的支援,可以在requestcontext獲取,設定timezone資訊,spring還提供datetime的轉換功能:http://docs.

spring.io/spring/docs/4.0.

0.release/spring-framework-reference/htmlsingle/#mvc-timezone

支援stomp message協議

2樓:匿名使用者

#include

#include

#include

void code(int n)

{char c;

while((c=getchar())!='\n'){if(c>='a'&&c<='z')

spring的特性是什麼?

Spring是什麼?spring 是什麼意思

spring是一個開放源 的j2ee應用程式框架,由rod johnson發起,是針對bean的生命週期進行管理的輕量級容器 lightweight container spring解決了開發者在j2ee開發中遇到的許多常見的問題,提供了功能強大ioc aop及web mvc等功能。spring可以...

spring代替mvc和hibernate整合問題

呵呵,這個是肯定的啊 還有spring代替mvc這說法你自己想出來的吧?呵呵,這個spring不是這樣用的 如何使用啊?怎麼注入。注入到哪啊?這個就要你過載下hibernatedaosupport,這樣分頁就更方便了,還可以用hibernate的方法 看這個public class myhibern...

在Spring中配置Hibernate和單獨配置Hibernate的區別

spring配置的hibernate可以由其進行自動管理,呼叫hibernatetemplate,單獨配置的單獨使用,不整合。一個專案裡可以同時這麼用,但不建議。spring 是一個bean容器,也是bean manager,用它負責建立bean,並且管理bean的生命週期,是我們採用框架式開發不可...