本周 Spring 动态:2011 年 8 月 30 日

工程 | Josh Long | 2011 年 8 月 31 日 | ...

欢迎来到另一期“本周 Spring”!有很多内容要讲,所以我们开始吧。快速说明一下:如果您正在阳光明媚的拉斯维加斯参加 VMworld 2011,请到云应用平台展位来打个招呼。

  1. 对于 CloudFoundry 来说,这真是一个星期!本周发布并提供了 Micro Cloud Foundry,这是一个可免费下载的“随身 PaaS”。Micro Cloud Foundry 是一个完整的、本地版本的流行开源平台即服务,允许开发人员在他们的 Mac 或 PC 上运行一个功能齐全的云。使用 Micro Cloud Foundry,开发人员可以在本地构建端到端的云应用程序,无需配置中间件的麻烦,同时保留部署位置的选择,并能够在不更改任何代码的情况下扩展其应用程序。

    要了解有关 Micro Cloud Foundry 的更多信息,请查看这三篇博文,它们将 Micro Cloud Foundry 介绍给 Spring 开发人员Grails 开发人员,并介绍了 SpringSource Tool Suite 中对 Micro CloudFoundry 的支持

    	</li> 
    	
    	<LI>Thomas Risberg blogged today about <A HREF="http://blog.springsource.com/2011/08/30/using-postgres-on-cloud-foundry/">using PostgreSQL on Cloud Foundry</a>. The recently announced  PostgreSQL support   makes CloudFoundry the natural place to deploy your enterprise applications: between MySQL and PostgreSQL there's very likely few speed or feature that you can't match on CloudFoundry. <a href="http://www.cloudfoundry.com">Try it out today!</a>  
    		
    	 </LI><LI> Mark Thomas had an article on <a href="http://tomcatexpert.com">Tomcat Expert</a> last week about  <A href="http://www.tomcatexpert.com/blog/2011/08/25/apache-tomcat-8-and-java-7-will-they-work-together">Tomcat 8 and Java 7</a>, answering the  question: <EM>will they work together</EM>? 
    	 
    	</LI>
    	 <LI>Roy Clarkson, lead of the Spring Android project, <a href="http://blog.springsource.com/2011/08/26/clean-code-with-android/">recently blogged about the various dependency injection options for Android</A> and how to write cleaner code. Check it out for a look at the modern Android developers toolkit. 
    		
    		</LI>
    	<LI> Spring provides many ways to support configuration. Spring 2.5 enhanced the options available with <EM>stereotypes</EM>, which let you 
    			specify a marker annotation as a way to define an injection site.
    			This <a href="http://code-on.blogspot.com/2011/08/how-to-use-type-safe-dependency.html">very nice blog post</a> first introduces some of the earlier ways to make maximum use of the type system with <CODE>@Autowired</CODE>, then introduces the <EM>stereotype</EM> model, cleanly and consistently. 
    			I wholly recommend it for a great look at an easy way to achieve  
    			cleaner code.
    		</LI> 
    	<LI> 
    	   In addition to the MicroCloud, last week saw <A HREF="http://blog.cloudfoundry.com/post/9374366916/cloud-foundry-adds-php-and-python-through-community">the announcement</A> of the availability of <a href="http://www.appfog.com/">PHP</a> and <a href="http://www.activestate.com/">Python</a> support through    community CloudFoundry providers. 
    		 This is an ideal situation for developers on those platforms and if you've always wanted first-class support for Python and PHP on a cloud, this release is for you! And, of course, if you're a Python developer, you should no  doubt be looking at <a href="http://springpython.webfactional.com/">Spring Python</a>, the <EM>Pythonic</EM>		port of the Spring framework. 
    	</LI>
    	<LI> Last week, Alan Stewart, lead of the Spring Roo project, <a href="http://www.springsource.org/node/3217">announced the availability</a> of the O'REILLY book, <EM>Getting Started with Spring Roo</EM>, that my co-author Steve Mayzak and I put together. O'REILLY worked closely with us to help make the book concise, and useful. O'REILLY have graciously agreed to make the book  <a HREf= "http://spring-roo-repository.springsource.org/Getting_Started_with_Roo.pdf">available for free download here</a>, as a <CODE>.PDF</CODE>. 
    		 Readers who want an alternative e-reader-specific format or want to get a print copy of the book on-demand may of course pursue those options at the <a href="http://oreilly.com/catalog/0636920020981">O'Reilly page for the book</a>. 
    		The book features an introduction to Spring Roo as well as an introduction to two of the many powerful, new addons being developed for Spring Roo: the Spring Data Neo4j addon, and the Vaadin web framework addon. 			 
    		</li>
    		<LI>
    			<A href ="http://www.springsource.org/node/3218">Virgo 3.0 and Gemini Web 2.0</a> have been released. 
    				The theme of Virgo 3.0 is better integration with EclipseRT technologies. To that end, we have created a Jetty variant of the Virgo web server and have switched from Felix to Equinox implementations of some OSGi services. 
    				Gemini Web and the Tomcat variant of the Virgo web server have been upgraded to Tomcat 7 and Servlet 3.0.			 
    		</LI>
    		<LI> 
    		 <A href="http://www.springsource.org/node/3219">Spring AMQP 1.0 GA has been released!</A> 
    		 I don't know about you guys, but I've been waiting for this one for a <EM>looong</EM> time. RabbitMQ  is one of the  most powerful messaging options available to enterprise Java developers today in traditional Spring applications <A href="http://blog.springsource.com/2011/08/16/chatting-in-the-cloud-part-1/">as well as in the cloud.</a>  
    			 Spring AMQP provides the idiomatic Spring support for RabbitMQ, including support for a <CODE>PlatformTransactionManager</CODE> abstraction, 
    			and a message listener container abstraction similar to the support available for JMS.
    			The GA release of the Spring AMQP integration clears the way for the inclusion of the Spring Integration AMQP support in the imminent  Spring Integration 2.1. Powerful stuff! Developers looking to get started with messaging in Spring might take a look at <a href="http://blog.springsource.com/2011/01/25/green-beans-getting-started-with-enterprise-messaging-and-spring/">this GreenBeans post ("Getting Started with Enterprise Messaging with Spring")</a>, which may be a bit out of date but provides a clear, concise introduction to the relevant concepts and options for both AMQP and JMS integration with Spring. 
    		</LI>
    		
    		<LI><A href="http://www.springsource.org/node/3221">Spring GemFire 1.1.0.M2 has been released!</a>
    			
    			This new release includes dedicated support for continuous query (Message Driven POJOs for GemFire), extensive client cache support,
    			and namespace support for region expiration. Very cool release, and users are highly encouraged to check it out. The continuous query support underlies the new Spring Integration Gemfire adapter that's expected to be in Spring Integration 2.1, as well: very powerful stuff! </LI>
    			
    		
    <li> <a href="http://www.springsource.org/spring-social/news/1.0.0.rc3-released">Spring Social 1.0.0.RC3 has just been released.</A> 
    	This release includes fixes for bugs reported since 1.0.0.RC2 and  tweaks to the API:  <CODE>ConnectInterceptor</CODE> implementations can now add parameters to the authorization URL, 		Twitter <CODE>TimelineOperations.updateStatus()</CODE>  can now post a photo, along with the status, returns a Tweet object, and can also be used to post a <EM>reply</EM> to an existing status. 
    	  
    	The set of sample applications has been updated, including two new examples: One to demonstrate a popup-based connection flow and another to demonstrate using Spring Social within a Facebook Canvas application.
    
    	</li>	<LI> 
    	Adobe Technical Evangelist Christophe Coenraets
    	<a href= "http://coenraets.org/blog/2011/08/flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps/">
    	  has updated the Flex / Spring Mobile Test Drive. 
    	</a>   
    
    	The new code is available on <a href="https://github.com/ccoenraets/flex-spring-mobile-testdrive">GitHub.com</a>. 		</li>
    	<LI>
    	This <a href="http://java.dzone.com/articles/spring-data-mongodb">post, by Artur Mkrtchyan</a>, does a nice job providing an introduction to writing a MongoDB client using regular Java and then taking it a step further and using the Spring Data project to talk to MongoDB. Good stuff, Artur!
    	</LI>
    
  2. Spring 中的作业调度支持一直非常强大,历史上支持 Quartz,并且从 Spring 3.0 及更高版本开始支持 @Scheduled 注解。但是,总有改进的空间,这篇博文探讨了这一点,甚至 链接到代码,这些代码允许您在核心 Spring 上构建,并获得类似于 @Scheduled 的易用性,同时委托给 Quartz 的强大功能。即使您对作业调度不感兴趣,这篇文章也很好地说明了如何利用丰富的生命周期钩子和组件模型来扩展 Spring 的 API 以用于您自己的应用程序,使用与框架本身相同的钩子。好东西!
  3. <LI> <a href ="http://community.jboss.org/people/johnnyren/blog/2011/08/26/understanding-spring-web-service-and-jaxb-integration">
      This post on community.jboss.org</A> about using Spring Web Services with JAXB is both concise and useful. It introduces the data modeling approach for  
        contract-first web services using Spring Web Services and JAXB, the Java API for XML binding. 		 
    </LI>
    
  4. 一位博主 Roger Hughes 最近写了一系列非常有见地的博文!第一篇博文介绍了 Spring 3 的 @NumberFormat第二篇介绍了 Spring 3 的 @DateTimeFormat 注解。 第三篇博文介绍了 Spring MVC 的 Conventions 类,它是最近 Spring MVC 版本中一些以约定优于配置为中心的重大更改的核心,例如,它允许您将任何对象添加到可用于视图的 Model 中,并省略用于存储该模型属性的名称,委托给 Conventions 类根据 JavaBeans 规范 提供一个合理的名称。

    在他最新的这篇博文中,他提醒说,虽然在某些情况下使用约定非常有用(例如使用 <mvc:annotation-driven/>),但使用某些默认值可能会导致混淆。这是一个合理的观点,无论哪种方式,拥有选择权都很好。Roger 干得好!

  5. 这篇博文强调了 Spring.NET 支持双向注入,这是一个使其与 Ninject 和 MS Unity 区别开来的特性。
  6. 想要在一台机器上运行多个 Tomcat 实例?这篇博文解释了详细的细节。好东西。

获取 Spring 电子邮件简报

通过 Spring 电子邮件简报保持联系

订阅

领先一步

VMware 提供培训和认证,以加速您的进步。

了解更多

获取支持

Tanzu Spring 通过一个简单的订阅提供 OpenJDK™、Spring 和 Apache Tomcat® 的支持和二进制文件。

了解更多

即将举行的活动

查看 Spring 社区中所有即将举行的活动。

查看全部