The Spring Blog
Engineering
Releases
News and Events

Welcome to another installment of This Week in Spring! This week I'm in Bangalore, India, for the Great Indian Developer Summit talking to developers about (wait for it..) Spring! I also met with a large system integrator here in Bangalore's Electronic City and addressed a large team of architects and engineers using Spring on projects worldwide. India's an interesting place because so much of their business comes from companies abroad who are trying to get extra help on otherwise overwhelming projects. Naturally, anything that helps get more done, quicker, is of interest here and Spring's a favorite. Needless to say, Spring Boot resonated a lot! It's not all work, though, when the local food is as good as it is here! :)

Read more...

Recorded at SpringOne2GX 2013 in Santa Clara, CA

Speaker: Mike Wiesner

Creating a secure application involves more then just applying Spring Security to it. This is of course not a new topic, but with the increased popularity of much more dynamic configurations for Servlet Containers and various Spring Projects, like Spring MVC and Spring Integration, it becomes more important to know about the Security tradeoffs we might get with that, and how to tackle them.

Learn more about Spring Security at http://projects.spring.io/spring-security

Read more...

Recorded at SpringOne2GX 2013 in Santa Clara, CA

Speaker: Costin Leau, Elasticsearch

Finding relevant information fast has always been a challenge, even more so in today's growing "oceans" of data. This talk explores the area of real-time full text search, using Elasticsearch, an open-source, distributed search engine built on top of Apache Lucene. The session will showcase how to perform real-time searches on structured and non-structured data alike, how to cope with types and suggestions, do social graph filters and aggregations for efficient analytics. All from a Spring perspective Last but not least, the presentation focuses on the Hadoop platform and how Map/Reduce, Hive, Pig or Cascading jobs can leverage a search engine to significantly speed up execution and enhance their capabilities. The presentation covers architectural topics such as index scalability, data locality and partitioning, using off and on-premise storages (HDFS, S3, local file-systems) and multi-tenancy.

Read more...

Speakers: Michael Hunger (Neo Technology) and Josh Long (Pivotal)

Spring Data Neo4j 3.0 is here and it supports Neo4j 2.0. Neo4j is a tiny graph database with a big punch. Graph databases are imminently suited to asking interesting questions, and doing analysis. Want to load the Facebook friend graph? Build a recommendation engine? Neo4j's just the ticket. Join Spring Data Neo4j lead Michael Hunger (@mesirii) and Spring Developer Advocate Josh Long (@starbuxman) for a look at how to build smart, graph-driven applications with Spring Data Neo4j and Spring Boot.

Read more...

Speaker: Gary Russell

The Spring Integration team has been hard at work on the latest release of the popular integration framework. Before version 4.0, it was impractical to define a complete Spring Integration flow without using XML. With this major release, the existing basic annotation support has received an overhaul and those who prefer to use java @Configuration classes can now define their applications without needing to use any XML (of course, XML is still supported as well). In this session we will cover these major changes to the framework, explaining how and when to use them. It will be mainly demonstration and code walk through, and we will build a useful Spring Boot / Integration application from scratch.

Read more...

As I'm sure most readers are aware, Java SE 8 was released last month. In conjunction with the recent release of STS 3.5.0 and its complete support for JDK 8, we thought now would be an ideal time to upgrade Sagan to take advantage of the new language features and APIs.

Note: Not yet familiar with the Sagan project? It's the Spring reference application that powers this blog and everything else at spring.io. Check out the first three posts in this series for more details.

Cloud Foundry's Java buildpack has provided support for JDK 8 since the day it was released. To begin using it, we've created our own fork of the buildpack, bumped the JDK version from 1.7.0 to 1.8.0, and configured our Gradle build to use our fork when deploying Sagan to production.

Read more...

Spring Security OAuth 2.0.0.RC1 is available now from the Spring Repo. This is a huge step in the direction of modernisation and ease of use for OAuth server and client apps on Spring.

The headline feature is support for @Configuration(for OAuth2 only) and if you use Spring Boot to write your app you can serve tokens and protect the API resources in about 25 lines of code:

@Configuration
@EnableAutoConfiguration
@EnableResourceServer
@RestController
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @RequestMapping("/")
    public String home() {
        return "Hello World";
    }

    @Configuration
    @EnableAuthorizationServer
    protected static class OAuth2Config extends AuthorizationServerConfigurerAdapter {

        @Autowired
        private AuthenticationManager authenticationManager;

        @Override
        public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
            endpoints.authenticationManager(authenticationManager);
        }

        @Override
        public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
            clients.inMemory()
                .withClient("my-trusted-client")
                    .authorizedGrantTypes("password", "authorization_code", "refresh_token")
                    .authorities("ROLE_CLIENT", "ROLE_TRUSTED_CLIENT")
                    .scopes("read", "write", "trust")
                    .resourceIds("oauth2-resource")
                    .secret("secret");
        }

    }

}
Read more...

The Spring XD team is pleased to announce that Spring XD Milestone 6 is now available for download.

This is our biggest release yet! The team has been hard at work, and Milestone 6 contains a wealth of new features that meet enterprise requirements in terms of reliability, performance, and user experience. Below is a quick Top Ten (in no particular order), but if you checkout the release notes you will realize how difficult it is to pick out 10 from the list of 299.

  • Distributed and Fault Tolerant Runtime: Leader election among multiple xd-admin servers and automatic redeployment of modules to other xd-containers in the case of failure. ZooKeeper is introduced to manage the cluster and its deployment state.

  • Support for running XD on YARN: Run admin and container nodes on a Hadoop YARN cluster rather than on VMs or physical servers that you need to manage. There are simple configuration and shell scripts that make this process very easy.

  • Deployment Manifests: When deploying a stream you can provide a deployment manifest that describes how to transform the logical stream definition (e.g. http | hdfs) to a physical deployment on the cluster. You can specify the number of instances of each module to deploy and also a criteria expression (using SpEL) that evaluates each of the available containers in the cluster to determine the best matches for those module instances. This will be an area of active development for the next release as we extend the manifest to include support for data partitioning strategies.

  • Real-Time Evaluation of Machine Learning Scoring Algorithms: Integration with the JPMML-Evaluator library that provides support for a wide range of model types and is interoperable with models exported from popular data analysis packages such as R. Integration with other libraries is supported by providing an implementation of XD's Analytic and MappedAnalytic abstractions. Give it a try with the sample application based on the classic iris data set.

  • Updated UI: A redesign and rewrite of the UI that has a modern look and feel.

  • Enhanced DSL Auto-completion: Tab completion now works within the value of the --definition option when creating streams and jobs. Creating streams and jobs has never been easier. Try it out via xd-shell!

  • Default stream for the Batch Job lifecycle: Batch jobs are a source of event data. Add a tap to a Batch Job to receive events upon upon job success/failure, individual step actions or even item level actions. This functionality along with the support for launching jobs by sending messages to a named channel, enables your applications to have a complex event-driven flow between the batch and streaming domains.

  • Improved server and module configuration options: Server and module configuration have been separated to help with the life-cycle of upgrading them independently. Module configuration has been made more modular while allowing for shared configuration between related modules.

  • High performance TCP/UDP source: Based on the Reactor project - the Reactor IP source on commodity hardware can consume ~1 Million msgs/second.

  • FTP to HDFS job: Out of the box support for jobs to transfer files from FTP to HDFS. Those jobs take advantage of another new feature: partitioning of steps across multiple XD Containers.

Read more...

Recorded at SpringOne2GX 2013, in Santa Clara, CA

Speakers: Josh Long

Alright, so maybe "bootiful" won't ever work, but I tried, and it was worth it too because you're reading this. Spring Boot, the new convention-over-configuration centric framework from the Spring team at Pivotal, marries Spring's flexibility with conventional, common sense defaults to make application development not just fly, but pleasant! Join Spring developer advocate Josh Long for a look at what Spring Boot is, why it's turning heads, why you should consider it for your next application (REST, micro services, web, batch, big data, integration, whatever!) and how to get started.

Read more...

I am happy to announce the second service release of the Spring Data release train named Codd. The full list of participating modules looks as follows:

Read more...