Subscribe: Javalobby - The heart of the Java developer community
Added By: Feedage Forager Feedage Grade A rated
Language: English
announced spring  announced  boot  cloud  effective java  java  lead  memory  principle  spring boot  spring cloud  spring  time 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Javalobby - The heart of the Java developer community

DZone Java Zone

Recent posts in Java on


Introducing Combinators – Part 1

Tue, 12 Dec 2017 14:01:01 GMT


In this article, we present a few basic functional constructs that every developer should be aware of. We also introduce the concept of combinator, which is of key importance to write useful functional code, though we carefully avoid digging into the intricacies of combinatory logic.


Have you ever had the need to execute the same code in many places? Have you ever copy-pasted this same code over here and there, because you didn't have time to develop a more robust solution? Or maybe you are a more meticulous programmer and have never done that. Instead, you've created a method with that piece of code and have invoked it from wherever you needed to do it...

Creating a Spring Boot Project With Eclipse and Maven

Tue, 12 Dec 2017 10:02:02 GMT

Setting up a basic project with Spring Boot is a cake walk. In this article, we will explore the different options of creating Spring Boot projects with Maven and Eclipse. You will learn:

  • How to bootstrap a simple project with Spring Initializr.
  • How to use the Spring Starter Eclipse Plugin to create a simple project with Spring Boot, Maven, and Eclipse.
  • How to create a Spring Boot project manually, step-by-step.

Video References

Tools You Will Need

  • Maven 3.0+ is your build tool
  • Your favorite IDE (we use Eclipse in this article)
  • JDK 1.8+

Introduction to Maven

Defining what Maven does is very difficult. To help explain, let's consider some of the things that a developer does every day...

How to Create an Immutable Class in Java

Tue, 12 Dec 2017 05:01:01 GMT

An object is immutable if its state cannot change after construction. Immutable objects don’t expose any way for other objects to modify their state; the object’s fields are initialized only once inside the constructor and never change again.

In this article, we'll define the typical steps for creating an immutable class in Java and also shed light on the common mistakes which are made by developers while creating immutable classes.

SRP in Object-Oriented Design

Mon, 11 Dec 2017 21:01:01 GMT

In object-oriented programming, there are five basic principles (SOLID) that, properly applied, make the difference between good and bad design. They're the difference between an application that is easy to maintain and one that is not. The difference between a good developer and a bad one. Today, I would like to concentrate on the first principle in object-oriented design (the Single Responsibility Principle) but first, let’s mention the five SOLID principles:

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle 

Single Responsibility Principle

We’re going to start with the first one, the Single Responsibility Principle (SRP) that is defined by Robert C. Martin in his book “Agile Software Development, Principles, Patterns, and Practices”. The principle is actually a very simple concept to explain, but it can be difficult to implement. As its name suggests, it implies that a class or module must have a unique responsibility.

Java Annotated Monthly: December 2017

Mon, 11 Dec 2017 17:01:01 GMT

While Java Annotated Monthly is usually brought to you by our colleague Trisha Gee, for the next few months, I’ll be your host, as Trisha is away on maternity leave. And from all of us here, congratulations to her and her family!

Due to multiple releases and important conferences, November is probably the hottest time of the year for us at JetBrains. Finally, now when most of it is over, it’s time to compile the latest news into one piece.

Tail Recursion in Scala [Video]

Mon, 11 Dec 2017 11:01:01 GMT

Recursion is quite common in the programming world. As you probably know, it's the process of solving a problem by breaking it down into smaller subproblems. You can easily spot recursion if you see a method calling itself with a smaller subset of inputs.

Why Recursion?

Many programmers consider recursion tough and error-prone, but in Scala, we use recursion because:

10 Talented Women in the Java/JVM Community

Mon, 11 Dec 2017 08:01:01 GMT

A couple of weeks ago, Duchess, a global organization for women in Java technology, celebrated its 10th anniversary:

This got me thinking of the women in the Java/JVM community from whom I have learned a lot, whether through their books, courses, or presentations.

Automatic-Module-Name: Calling All Java Library Maintainers

Mon, 11 Dec 2017 05:01:01 GMT

Creating modular applications using the Java module system is an enticing prospect. Modules have module descriptors in the form of, declaring which packages are exported and what dependencies it has on other modules. This means we finally have explicit dependencies between modules at the language level and can strongly encapsulate code within these modules. The book Java 9 Modularity (O'Reilly) written by Paul Bakker and me explains these mechanisms and their benefits in detail.

That, however, is not what this post is about. Today, we'll talk about what needs to be done to move the Java library ecosystem toward modules. In the ideal world where all libraries have module descriptors, all is well.

Memory Leaks: Fallacies and Misconceptions

Sun, 10 Dec 2017 06:01:01 GMT

In the years we have spent building Plumbr, we have detected and solved so many memory leaks that I have actually lost count. Interestingly, during these years, we have encountered even more situations where a memory leak was nowhere in sight, but somehow our users were convinced that there had to be one. The pressure from such users has been high enough for us to even come up with a specific term that we use internally: “memory anxiety.”

With Java memory management being a complex domain, I do understand the background of this anxiety. When your software does not perform the way it should, the current state of root cause detection forces you to apply different kinds of dark arts to really understand what is going on. Often enough, the process involves a lot of guesswork. One of the frequent guesses seems to often take the form of, “Gosh, I have a memory leak”. In this post, I would like to give some examples of different situations and suggest patterns that you can follow to verify whether or not you actually are a victim of a memory leak.

Spring 5, Embedded Tomcat 8, and Gradle

Sat, 09 Dec 2017 05:01:01 GMT

In this article, we are going to learn how to use Gradle to structure a Spring 5 project with Tomcat 8 embedded. We will start from an empty directory and will analyze each step needed to create an application that is distributed as an über/fat jar. This GitHub repository contains a branch called complete with the final code that we will have after following the steps described here.

Why Spring

Spring is the most popular framework available for the Java platform. Developers using Spring can count on a huge, thriving community that is always ready to help. For example, the framework contains more than 11k forks on GitHub and more than 120k questions asked on StackOverflow are related to it. Besides that, Spring provides extensive and up-to-date documentation that covers the inner workings of the framework.

After 10 Years, Effective Java 3rd Edition Is Coming Soon

Fri, 08 Dec 2017 21:01:01 GMT

Hello guys, I have an interesting news to share with you today. After a long wait of almost 10 years, Effective Java 3rd edition is finally coming this year.

The Effective Java 2nd Edition was released in May 2008 and updated for Java SE 6, but it has been a good 10 years now and there is a lot of interest from Java developers around the world for Effective Java 3rd edition, especially after Java SE 8's release. I am very happy to inform you all that, finally, all our wishes have been granted and Effective Java 3rd edition is set to arrive this year.

This Week in Spring: Tool Suites and Cloud Gateways

Fri, 08 Dec 2017 17:01:01 GMT

Hi, Spring fans and welcome to This Week in Spring from the premier JVM-language event SpringOne Platform 2017! There is a massive amount of stuff to cover, especially in light of SpringOne Platform, so let’s get to it! Spring Cloud co-founder Spencer Gibb just announced Spring Cloud Finchley M5. Spring Tools lead Martin Lippert just announced the first previews of Spring Tool Suite 4 and the new IDE-agnostic language servers. Also, I did a special (and early!) Spring Tip that looked at these topics. Spring Batch lead Michael Minella just announced Spring Batch 4.0.0. Dr. Dave Syer has updated the Spring Security and Angular_ and Spring Boot and OAuth tutorials. Spring ninja Greg Turnquist just announced Spring Session updates for Core, MongoDB, and Apache Geode. Spring Cloud Data Flow lead and co-founder Dr. Mark Pollack just announced Spring Cloud Data Flow 1.3.0.M3. Spring Integration lead Gary Russell just announced Spring for Apache Kafka 2.1.0 and 1.3.2, and 2.0.2. Spring Boot co-founder and lead Phil Webb just announced Spring Boot 2.0.M7 Spring IO Platform lead Andy Wilkinson just announced Spring IO Platform Brussels SR6 Spring Integration ninja Artem Bilan just announced Spring Integration 5.0.GA Last week, I looked at the new Spring Cloud Gateway project in a Spring Tips installment Then, there was the release of Spring AMQP 1.7.5 and 2.0.1. Not one to rest on his laurels, Spring REST Docs Andy Wilkinson just announced Spring REST Docs 2.0.0. Spring Security lead Rob Winch just announced Spring Security 5.0. Spring REST Docs lead Andy Wilkinson also announced Spring REST Docs 1.2.3. Spring Boot ninja Stéphane Nicoll just announced Spring Boot 1.5.9. Spring Data ninja Mark Paluch pulled together an amazing look at binding applications to Hashicorp’s Vault with Spring in Cloud Foundry. [...]

Refer to a Connector Configuration From a Java Component [Snippet]

Fri, 08 Dec 2017 11:01:01 GMT

When using a Java component to send a message to a VM inbound endpoint, if there is more than one connector configuration defined, then it is necessary to specify the connector reference to use. Otherwise, an error similar to the one below will be shown:

There are at least 2 connectors matching protocol "vm", 
so the connector to use must be specified on the endpoint 
using the 'connector' property/attribute. Connectors in your 
configuration that support "vm" are: VM-1, VM-2, 
(java.lang.IllegalStateException). Component that caused 
exception is: DefaultJavaComponent{vm-javaFlow.component.2140635066} 

Choosing the Right GC

Fri, 08 Dec 2017 08:01:01 GMT

Size matters when it comes to software. It has become clear that using small pieces within a microservices architecture delivers more advantages compared to the big monolith approach. The recent Java release of Jigsaw helps decompose legacy applications or build new cloud-native apps from scratch.

This approach reduces disk space, build time, and startup time. However, it doesn’t help enough with RAM usage management. It is well-known that Java consumes a large amount of memory in many cases. At the same time, many have not noticed that Java has become much more flexible in terms of memory usage and provided features to meet the requirements of microservices.

The Power of the Gradle Kotlin DSL

Fri, 08 Dec 2017 05:01:01 GMT

The following is based on Gradle 4.3.1.

A few weeks ago, I started migrating most of my Groovy-based scripts to Kotlin-backed scripts using the Kotlin DSL.

Scala: The Option Type (Part 1)

Thu, 07 Dec 2017 21:01:01 GMT

Developers familiar with Java would have experienced NullPointerExceptions at some point. It is mainly used to indicate that no value or null is assigned to a reference variable or an Object.

Different languages treat null in different ways. Scala tries to solve the problem of nulls by getting rid of null values altogether and by providing a type to represent an optional/unknown value, i.e. Option[Employee].

Uncommon Java Syntax: Ellipses…

Thu, 07 Dec 2017 17:01:02 GMT

Existing since Java SE 5.0 the ellipsis, also known as varargs, is one of those rarely underutilized features of Java. My guess is many novice programmers, and indeed even some experienced ones, have yet to meet Mr. Ellipsis — "…". I for one didn’t come across this elegant feature until after a year of full-time programming with Java. So what is an ellipsis?

Defining Varargs

I could not find any clear definition from the Javadocs but from what I could gather online, ellipses (also officially known as varargs (Variable Arguments)) are a Java syntax that describes an argument in a method that can take in zero or many arguments. Confusing? Let’s look at an example.

Java Quiz 6: Calling Constructors by Using the Keyword This

Thu, 07 Dec 2017 14:01:12 GMT

Before we start with this week's quiz, here is the answer to Java Puzzle 5: Static Variables and Object Instantiation.

  1. We actually need to invoke the method intMethod to assign a value to the variable i and invoke the strMethod to assign a value to the object str.

Expert Advice: NoSQL Options for Java Devs (Part 2)

Thu, 07 Dec 2017 08:01:01 GMT

A few months ago, I wrote about NoSQL Options for Java Developers. To create that post, I analyzed data from a variety of sources (Indeed jobs, GitHub stars, Stack Overflow tags) to choose the top five options: MongoDB, Redis, Cassandra, Neo4j, and PostgreSQL. For this follow-up post, I shared my findings with a few experts I know in the Java and NoSQL communities and asked them the following questions:

  1. Do you agree with my choices of the top 5 NoSQL options (MongoDB, Redis, Cassandra, Neo4j, and PostgreSQL with its JSON support)?
  2. Do you have any good or bad stories about using any of these databases in production?
  3. Have you found any of these databases particularly difficult to get started with or maintain over time?
  4. What is your favorite NoSQL database and why?
  5. Anything else you’d like to share?

Today, I’m happy to share their answers with you. But first, some introductions.

Java Concurrency in Depth (Part 1)

Thu, 07 Dec 2017 05:01:01 GMT

Java comes with strong support for multi-threading and concurrency, which makes it easy to write concurrent applications. But usually, multi-threaded applications are tricky to debug, troubleshoot, and sometimes to scale. From my experience with concurrent applications, most of the issues are found when they run at scale, which means when they go live in many cases. In order to make this easier, it is better to understand how things work under the hood and the pros and cons of every choice. 

This article is the first in a series of articles discussing the internals of Java concurrency.