Core container refinements in Spring Framework 4.3

Engineering | Stéphane Nicoll | March 04, 2016 | ...

Spring Framework 4.3.RC1 is around the corner and brings nice core container refinements which we are going to explore in this post...

Implicit constructor injection for single-constructor scenarios

Consider the following service class:

@Service
public class FooService {

    private final FooRepository repository;

    @Autowired
    public FooService(FooRepository repository) {
        this.repository = repository
    }
}

Quite a common use case but if you forget the @Autowired annotation on the constructor, the container will throw an exception looking for a default constructor, unless you explicitly indicate autowire mode 'constructor' in your bean definition setup (e.g. in an XML <bean>

This Week in Spring - March 1, 2016

Engineering | Josh Long | March 01, 2016 | ...

Welcome to another installment of This Week in Spring! This week, I'm in Shenzhen, China and Zurich, Switzerland for Voxxed Days Zurich. It's going to be a busy week indeed though I sure hope to see you there! Anyway, we've got a lot to cover this week so let's get to it!

This Week in Spring - February 23, 2016

Engineering | Josh Long | February 23, 2016 | ...

Welcome to another installment of This Week in Spring! We're already staring down the last weeks of February!

This Week in Spring - February 16th, 2016

Engineering | Josh Long | February 16, 2016 | ...

Welcome to another installment of This Week in Spring! It's been a busy week for all of us on the Spring team, as you're about to see! I've just finished my presentation at the epic DevNexus show and now I'm off to visit customers in Hartford and Los Angeles before making my way to the epic ConFoo conference in Montreal, Canada. If you're in the area, be sure to ping me and say hi!

We've got a lot to cover, so let's get to it!

Spring AMQP 1.6.0 Milestone 1 (and 1.5.4) Available

Engineering | Gary Russell | February 16, 2016 | ...

We are pleased to announce the availability of the first milestone of the 1.6 version of Spring AMQP.

Some highlights of this release:

  • A new jar spring-rabbit-test containing a test harness to help with testing @RabbitListener methods; see the testing chapter.

  • Multiple @RabbitListener annotations on a method (when using Java 8) and the @RabbitListeners annotation (for pre-Java 8), each allowing the same method to be the listener method for multiple listener containers.

  • Full support for the Delayed Message Exchange RabbitMQ plugin.

  • An AsyncRabbitTemplate returning ListenableFuture<?> for request/reply messaging.

  • An option to publish ApplicationEvents when listener containers go idle.

Distributed Tracing with Spring Cloud Sleuth and Spring Cloud Zipkin

Engineering | Josh Long | February 15, 2016 | ...

I was inspired by OpenZipkin contributor and Spring Cloud Sleuth and Zipkin contributor Adrian Cole's epic talk introducing Zipkin to write this particular post. There's so much epic stuff in that talk, so once you're done reading this, go watch that!

Advances in technology and cloud computing have made it easier to stand up and deploy services with ease. Cloud computing enables us to automate away the pain (from days or weeks (gasp!) to minutes!) associated with standing up new services. This increase in velocity in turn enables us to be more agile, to think about smaller batches of…

Developing Spring Boot applications with Kotlin

Engineering | Sébastien Deleuze | February 15, 2016 | ...

Update: a comprehensive Spring Boot + Kotlin tutorial is now available.

Just in time for Kotlin 1.0 release, we are adding support for Kotlin language to https://start.spring.io in order to make it easier to start new Spring Boot projects with this language.

This blog post is also an opportunity for me to explain why I find this language interesting, to show you a sample project in detail and to give you some tips.

What is Kotlin?

Kotlin is a language created by JetBrains. It runs on top of the JVM (but not only), it is an object oriented language that includes many ideas from functional programming. I won't go too much in details about all Kotlin features (PDF, HTML

Spring Data Couchbase 2.0

Engineering | Josh Long | February 10, 2016 | ...

This is a cross-post blog from Simon BASLÉ from Couchbase. You can find him on twitter (@simonbasle) or github. Learn more about Couchbase and the Couchbase Java SDK on the developer portal. Thanks again, Simon and great job to you and your team! -Josh

Spring Data Couchbase 2.0 is a rewrite of the original Spring Data Couchbase 1.4.x connector. It is based on the Couchbase Java 2.2 SDK and makes heavy use of the new query language N1QL (which was introduced in Couchbase Server 4.0) to offer more features for Spring Data users.

The first Milestone has been released last august, then a Release…

This Week in Spring - February 9th, 2016

Engineering | Josh Long | February 09, 2016 | ...

Welcome to another installation of This Week in Spring! This week I'm in beautiful Stockholm, Sweden at the amazing JFokus conference. It's also Shrove Tuesday here in Sweden and the custom is to over-indulge, so as I type this I am eating a Semla. I hope you too enjoy over-indulging on this week's epic roundup!

  • the world's worst kept secret is finally announced! We've been developing a reactive runtime for Spring MVC, and you can start to kick the tires! Check out this amazing blog on Spring 5's ambitions for reactive web programming!
  • Spring Cloud Stream lead Marius Bogoevici has just announced Spring Cloud Stream 1.0.0.M4 which, among other things, defaults to publish/subscribe semantics, supports a notion of consumer groups, provides a simplified binder SPI, resettable Kafka offsets, and so much more! Check it out!
  • the 2.0.0.RELEASE of Spring Data Couchbase just dropped!

Reactive Spring

Engineering | Rossen Stoyanchev | February 09, 2016 | ...

At SpringOne2GX 2015, Juergen announced plans for Spring Framework 5 with a major focus on reactive architectures. Concrete efforts are already underway and a lot has happened since!

At the most basic level, reactive programming models allow for writing non-blocking services and applications. This requires a fundamental shift from writing imperative logic to async, non-blocking, functional-style code, in particular when interacting with external resources.

Reactive Web Applications

Most Java web applications are built on the Servlet API which was originally created with synchronous and…

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all