The Baeldung Weekly Review 18 – Baeldung周报》18

最后修改: 2014年 5月 9日

中文/混合/英文(键盘快捷键:t)

1. Spring

1.Spring

>> Preview Spring Security Test: Method Security

Spring Security 4.0 being announced makes me very excited. This first look goes into how to test secured methods – looks very clean – and the new @WithMockUser is going to be especially handy.

Spring Security 4.0的发布让我非常兴奋。这第一篇报道介绍了如何测试安全方法–看起来非常干净–新的@WithMockUser将特别方便。

>> Writing Clean Tests – It Starts from the Configuration

A nuanced discussion on building out a test suite in Spring, while keeping the DRY principle in mind. If you’re working with Spring (and chances are – if you’re reading my blog – you are) – this is well worth reading.

关于在Spring中建立测试套件的细致讨论,同时牢记DRY原则。如果你正在使用Spring(如果你正在读我的博客,你有可能是),这篇文章非常值得一读。

>> Tracking Exceptions – Part 6 – Building an Executable Jar

Latest and perhaps final installment of a series I’ve been covering on the Baeldung weekly review ever since it started – building an Spring application that is going to analyze and report on logging data. This is about packaging the app.

自从Baeldung周评开始以来,我一直在报道这个系列的最新一期,也许也是最后一期–构建一个要分析和报告日志数据的Spring应用程序。这是关于打包应用程序。

>> Spring HATEOAS – 0.11.0 Release

Spring HATEOAS is – in my view – one of the most interesting new projects in the Spring ecosystem. It is so very cool that Spring is looking at this as a first class citizen and moving it forward – check out the new Traverson API for a high level fluent API for discovering a Hypermedia service.

Spring HATEOAS是–在我看来–Spring生态系统中最有趣的新项目之一。Spring将其视为第一等公民并将其向前推进,这是非常酷的–请查看新的Traverson API,它是发现超媒体服务的高级流畅API。

>> Spring Scala based sample bean configuration

While I’m not personally doing work in Scala (I lean towards Clojure when it comes to JVM languages) – I found it interesting to see just how flexible Spring configuration has become.

虽然我个人并不从事Scala方面的工作(当涉及到JVM语言时,我倾向于Clojure)–但我发现看到Spring配置变得如此灵活是很有趣的。

2. Java

2.Java

>> @OneToOne with shared primary key, revisited

A solution for a one-to-one relation with JPA 2.0. Short, useful and to the point.

使用JPA 2.0的一对一关系的解决方案。简短、有用且切中要害。

>> Three-State Booleans in Java

A custom implementation of a ResultSet iterator necessary for working with the new Java 8 streams syntax. The solution is – like any other design decision – a compromise; however, understanding both sides of a compromise is usually where learning happens (at least for me) – which makes this a very nice read indeed.

一个ResultSet迭代器的自定义实现对于使用新的Java 8流语法来说是必要的。和其他设计决策一样,这个解决方案也是一种妥协;然而,理解妥协的两面性通常是学习发生的地方(至少对我来说是这样)–这使得这本书确实是一本非常好的书。

3. Technology

3.技术

>> UnitTest

Martin Fowler on Unit Testing. What else do you really need to know?

Martin Fowler谈单元测试。还有什么是你真正需要知道的?

>> If You Can Read This, You’re SNIing

A very interesting little read about requiring SNI information or hard-failing if it’s not present. Very cool step to take, especially considering that we have ran out of IPv4 addresses last year.

一个非常有趣的小读物,关于要求SNI信息或在不存在SNI的情况下硬失败。采取的步骤非常酷,特别是考虑到我们去年已经用完了IPv4地址。

4. Musings

4.思索

>> Encapsulation vs Inversion of Control

One of the every once in a while posts that made me reconsider some stuff I was taking as a given. I like that.

这是每隔一段时间的一个帖子,让我重新考虑一些我认为是既定的东西。我喜欢这样。

>> Test Driven Discipline

Doing TDD is without a doubt a transformative practice for a developer. Realistically – it is also hard to stick with it.

对开发者来说,做TDD无疑是一种变革性的做法。现实上–坚持下去也很难

It took me around 2 years of giving it the ol’ college try a few times until I really took the step of integrating it into my day to day. And there are still project where – for some reason or another – I don’t do it.

我花了大约两年时间,在大学里尝试了几次,直到我真正迈出了将它融入我的日常工作的一步。但仍有一些项目–出于某种原因–我没有这样做。

This article is a pragmatic view on what it means to do TDD.

这篇文章是对做TDD意味着什么的一种务实的看法。