欢迎您访问大连首闻科技有限公司,我们将竭诚为您服务 联系我们
Spring 4.3.0.RC1 发布
栏目:开源项目   作者:布丁不加冰   信息来源:开源中国   发布时间:2016-04-10

Spring 4.3.0.RC1 发布了。

主要更新内容如下:

核心容器

  • It is no longer necessary to specify the @Autowired annotation if the target bean only defines one constructor.

  • @Configuration classes support constructor injection.

  • Any SpEL expression used to specify the condition of an @EventListener can now refer to beans (e.g. @beanName.method()).

  • Composed annotations can now override array attributes in meta-annotations with a single element of the component type of the array. For example, theString[] path attribute of @RequestMapping can be overridden with String path in a composed annotation.

  • @Scheduled and @Schedules may now be used as meta-annotations to create custom composed annotations with attribute overrides.

数据获取

  • jdbc:initialize-database and jdbc:embedded-database support a configurable separator to be applied to each script.

缓存

  • SpEL expressions in caches-related annotations can now refer to beans (i.e. @beanName.method()).

  • ConcurrentMapCacheManager and ConcurrentMapCache now support the serialization of cache entries via a new storeByValue attribute.

  • @Cacheable@CacheEvict@CachePut, and @Caching may now be used as meta-annotations to create custom composed annotations with attribute overrides.

JMS

  • @SendTo can now be specified at the class level to share a common reply destination.

  • @JmsListener and @JmsListeners may now be used as meta-annotations to create custom composed annotations with attribute overrides.

Web

  • Built-in support for HTTP HEAD and HTTP OPTIONS.

  • New @GetMapping@PostMapping@PutMapping@DeleteMapping, and @PatchMapping composed annotations for @RequestMapping.

  • New @RequestScope@SessionScope, and @ApplicationScope composed annotations for web scopes.

  • New @RestControllerAdvice annotation with combined @ControllerAdvice with @ResponseBody semantics.

  • @ResponseStatus is now supported at the class level and inherited by all methods.

  • New @SessionAttribute annotation for access to session attributes (see example).

  • New @RequestAttribute annotation for access to request attributes (see example).

  • @ModelAttribute allows preventing data binding via binding=false attribute (see reference).

  • Static resource handling uses the configured ContentNegotiationManager for media type determination.

  • RestTemplate and AsyncRestTemplate support strict URI variable encoding via DefaultUriTemplateHandler.

  • AsyncRestTemplate supports request interception.

WebSocket

  • @SendTo and @SendToUser can now be specified at class-level to share a common destination.

测试

  • The JUnit support in the Spring TestContext Framework now requires JUnit 4.12 or higher.

  • New SpringRunner alias for the SpringJUnit4ClassRunner.

  • An empty declaration of @ContextConfiguration can now be completely omitted if default XML files, Groovy scripts, or @Configuration classes are detected.

  • @Transactional test methods are no longer required to be public (in TestNG and JUnit 5).

  • @BeforeTransaction and @AfterTransaction methods are no longer required to be public.

  • The ApplicationContext cache in the Spring TestContext Framework is now bounded with a default maximum size of 32 and a least recently used eviction policy. The maximum size can be configured by setting a JVM system property or Spring property called spring.test.context.cache.maxSize.

  • New ContextCustomizer API for customizing a test ApplicationContext after bean definitions have been loaded into the context but before the context has been refreshed. Customizers can be registered globally by third parties, foregoing the need to implement a custom ContextLoader.

  • @Sql and @SqlGroup may now be used as meta-annotations to create custom composed annotations with attribute overrides.

  • Server-side Spring MVC Test supports expectations on response headers with multiple values.

  • Server-side Spring MVC Test parses form data request content and populates request parameters.

  • Client-side REST test support allows indicating how many times a request is expected and whether the order of declaration for expectations should be ignored (seeSection 15.6.3, “Client-Side REST Tests”).

  • Client-side REST Test supports expectations for form data in the request body.

发行详情请见发行说明

更新日志详情请点击

下载地址:

https://github.com/spring-projects/spring-framework/archive/v4.3.0.RC1.zip

https://github.com/spring-projects/spring-framework/archive/v4.3.0.RC1.tar.gz

Spring Framework 是一个开源的Java/Java EE全功能栈(full-stack)的应用程序框架,以Apache许可证形式发布,也有.NET平台上的移植版本。该框架基于 Expert One-on-One Java EE Design and Development(ISBN 0-7645-4385-7)一书中的代码,最初由 Rod Johnson 和 Juergen Hoeller等开发。Spring Framework 提供了一个简易的开发方式,这种开发方式,将避免那些可能致使底层代码变得繁杂混乱的大量的属性文件和帮助类。

文章转载自:开源中国社区 [http://www.oschina.net]
本文标题:Spring 4.3.0.RC1 发布
本文地址:http://www.oschina.net/news/72234/spring-4-3-0-rc-1

关键字:Spring