Spring Roo 1.2.3.RELEASE 发布
Spring Roo 团队很高兴地宣布 1.2.3.RELEASE 已发布。 这是 1.2 的第三个维护版本,包含许多问题的修复,并支持 Spring Framework 3.2.0。请查看更改日志,了解已完成的错误修复和改进列表。
希望您喜欢这个新版本!
Alan
Spring Roo 项目负责人
Spring Roo 团队很高兴地宣布 1.2.3.RELEASE 已发布。 这是 1.2 的第三个维护版本,包含许多问题的修复,并支持 Spring Framework 3.2.0。请查看更改日志,了解已完成的错误修复和改进列表。
希望您喜欢这个新版本!
Alan
Spring Roo 项目负责人
上周我宣布发布了 Spring Security 3.2 M1,其中包含了改进的 Servlet 3 支持。在这篇文章中,我将介绍 3.2 M1 版本中一些更令人兴奋的特性。具体来说,我们将看看以下 Spring Security 新特性
你可能会问:“在一个以 Servlet 3 为重点的版本中,并发支持有何作用?”原因是并发支持为本版本中的所有其他特性奠定了基础。虽然并发支持被 Servlet 3 集成使用,但它也可以作为在任何应用中支持并发和 Spring Security 的构建块。现在让我们看看 Spring Security 的并发支持。
Spring Security 并发支持中最基础的构建块之一是 DelegatingSecurityContextRunnable
。它封装了一个委托 Runnable
,以便使用指定的 SecurityContext
初始化委托的 SecurityContextHolder
。然后它调用委托 Runnable
,并确保之后清除 SecurityContextHolder
。DelegatingSecurityContextRunnable
大致如下所示
public void run() {
try {
SecurityContextHolder.setContext(securityContext);
delegate.run();
} finally {
SecurityContextHolder.clearContext();
}
}
虽然非常简单,但它可以无缝地将 SecurityContext
从一个 Thread
转移到另一个 Thread
。这很重要,因为在大多数情况下,SecurityContextHolder
是基于每个 Thread
工作的。例如,您可能使用了 Spring Security 的 <global-method-security> 支持来保护您的某个服务。现在您可以轻松地将当前 Thread
的 SecurityContext
转移到调用受保护服务的 Thread
。下面是实现这一目标的示例
Runnable originalRunnable = new Runnable() {
public void run() {
// invoke secured service
}
};
SecurityContext context = SecurityContextHolder.getContext();
DelegatingSecurityContextRunnable wrappedRunnable =
new DelegatingSecurityContextRunnable(originalRunnable, context);
new Thread(wrappedRunnable).start();
上面的代码执行以下步骤
Runnable
。请注意,它对 Spring Security 没有任何感知SecurityContextHolder
获取我们希望使用的 SecurityContext
,并初始化 DelegatingSecurityContextRunnable
DelegatingSecurityContextRunnable
创建一个 Thread
Thread
由于使用 SecurityContextHolder
中的 SecurityContext
创建 DelegatingSecurityContextRunnable
是一种常见做法,因此为此提供了一个快捷构造函数。以下代码与上面的代码相同
Runnable originalRunnable = new Runnable() {
public void run() {
// invoke secured…
亲爱的 Spring 社区,
在 Spring Framework 3.1 发布一年后,我很高兴地宣布 Spring Framework 3.2 现已正式发布!
我们建议从所有先前的 Spring 版本升级,特别是从 Spring Framework 3.1.x 升级,因为它是其直接后继版本。
如前所述,Spring Framework 3.2 的主要特性包括
欢迎来到新一期的《本周 Spring》!我们上周末结束了 SpringOne China,今天正在参加SpringOne India 在班加罗尔和海得拉巴的两场活动中的第一场。这些展会非常精彩!特别是,我们享受了美食、景点以及大量涌现的令人惊叹的社区!
![]() |
![]() |
![]() |
![]() |
<LI> Roy Clarkson has announced <a href = "http://www.springsource.org/spring-android/news/1.0.1-released">Spring for Android 1.0</a>, which adds support for Jackson 2.x in <code>RestTemplate</code> through the new <code>MappingJackson2HttpMessageConverter</code>. It also addresses several bugs and compatibility issues with <code>RestTemplate</code> and Android Jelly Bean.</LI>
<LI>The <a href="http://www.tomcatexpert.com">TomcatExpert.com portal</a> has a nice post on Spring Insight Developer to analyze code, <a href="http://www.springsource.org/node/3761">install it with Tomcat, and…
去年十月,在 SpringOne2GX 上,我向世界介绍了 Spring Scala 项目。此后,我还曾在 Devoxx 上介绍过这个项目。在这篇博文中,我将进一步详细介绍这个项目以及如何在您的 Scala 项目中使用它。
显然,您今天可以在 Scala 中使用(Java)Spring Framework,无需 Spring Scala。但在某些地方这样做会很别扭。就像任何编程语言一样,Scala 有自己独特的方式,在 Scala 中使用像 Spring 这样的纯 Java 框架会感觉“太 Java 化”。Spring Scala 试图解决…
作者: Brian Cavalier & John Hann
我们在 SpringOne 2GX 上做了一个关于 IOC + Javascript 的演讲。前端 Web 应用架构似乎是会议上一个非常热门的话题,总的来说,我们的演讲受到了很好的欢迎。这是演讲的 视频和 幻灯片。
我们还将开始一个关于现代 Javascript Web 应用架构模式的系列博文,文章将由 SpringSource 新的前端架构团队 S2JS 的成员撰写。这些文章将扩展我们在演讲中介绍的概念,以及 Scott Andrews 和 Jeremy Grelle 在他们的演讲中介绍的概念。
本系列的第一篇文章将于下周发布。在此之前,希望您喜欢这段 视频和 幻灯片。 如果您想提前了解,可以浏览演示应用的 源代码…
哇!伙计们!已经是12月4日了!快乐的时光总是过得很快!
Welcome back to another installment of <EM>This Week in Spring</EM>. This week, I'm in Beijing for <a href="http://springonechina.cloudfoundry.com">SpringOne China</a> and, next week, I'm off to India for <A href="http://springoneindia.cloudfoundry.com/">SpringOne India</a>. If you're in Beijing, Bangalore or Hyderabad, I'd love to see you at these events!
好了,让我们开始本周的总结!
</LI>
<LI>Martin Lippert's announced that the <a href="http://www.springsource.org/node/3757">Spring Tool Suite and Groovy Tool Suite 3.2.0.M1 have been released!</a> </li>
<LI> Tobias…
欢迎回到新一期的《本周 Spring》!如果您在美国,希望您在一个愉快度过的假期周末后得到了充分休息,因为我们这周有很多内容要介绍!
希望这份总结对您有所帮助。如果您想查阅前几周的总结,我们最近为博客存档创建了一个 本周 Spring 标签。
总之,这周我们有很多内容要介绍,所以让我们开始吧!
singleton
范围按需创建新的 Spring Bean。 <a href="http://www.hubberspot.com/2012/10/how-to-use-component-annotation-for.html">How to use <CODE>@Component</CODE>
annotation to automatically configure Spring beans</a>.
@Autowired
(或 @Inject
)实现责任链模式。thread
scope 的 Spring 和 Java 线程示例。我很高兴宣布我们发布了 Spring Migration Analyzer (SMA) 的第一个里程碑版本,这是一个命令行工具,用于分析企业 Java 应用并生成一份报告,描述应用以及如何迁移到 Spring。
当考虑将现有应用迁移到 Spring 时,通常是部署灵活性驱动这一举动,因为它可以显著降低应用的运营成本。
unzip spring-migration-analyzer-1.0.0.M1-dist.zip
设置好 JAVA_HOME 后,您就可以运行 migration-analysis 脚本来…
Scripted,一款来自 VMWare 的 JavaScript 编辑器,上个月在本博客上发布了公告。在本文中,我们将深入了解 Scripted 的 Dependency Analysis Engine(依赖分析引擎)。但在深入细节之前,先说明一下为什么我们需要它。
[caption id="attachment_12178" align="aligncenter" width="533" caption="跨文件内容辅助"][/caption]
两个组件协同工作以实现此目标
如果您想简单地将所有代码放入一个大文件中,那么一个高质量的推断器本身就足以提供相当好的内容辅助。然而,实际上,项目会分为…