Subscribe: Javalobby - The heart of the Java developer community
Added By: Feedage Forager Feedage Grade B rated
Language: English
boot  cloud  java  new  raw string  release  spring boot  spring cloud  spring webflux  spring  streams  string  support 
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


This Week in Spring: Java 10, Microservices, and Micrometer

Thu, 22 Mar 2018 16:01:01 GMT

Hi Spring fans, and welcome to the first day of the Spring season! This week I'm in San Francisco visiting some customers and just hanging out, working on new Spring Tips installments, enjoying the amazing weather. As if today wasn't exciting enough, Java 10 also shipped today! I know that all seems like enough already, but read on as we have a lot of good stuff this week! We want your feedback on this Spring Cloud Contract proposal to support fetching stubs over different protocols. Spring Cloud Data Flow ninja Gunnar Hillert has just announced Spring Cloud Data Flow 1.4.0. The new release includes improved dashboards, versioned streams, a new stream deployment builder, support for Docker compose, security improvements, proxy server support for the shell, LDAP Role Mapping support and improved documentation, among other things. This is a massive release with a lot of good stuff, so don't miss it! Spring Security and OAuth-ninja Joe Grandja has just released Spring Security OAuth 2.3.0 which now supports Elliptic Curve signature verification in JwkTokenStore, among other things. Micrometer project lead Jon Schneider gives an amazing introduction to all things Micrometer in this blog. Seriously, go read it. Micrometer is the metrics collection facade that underpins the /actuator/events endpoint in Spring Boot 2+. It is not tied to Spring or Spring Boot, though, and this post is well worth a read no matter what your technical stack. Spring Cloud co-founder Spencer Gibb has been toying with integrating Retrofit, as a sort of alternative to using something like Feign. This is a work-in-progress example, but feedback is always valuable and it's exciting to see what might be coming. Spring Cloud Open Service Broker lead Scott Frederick has just announced Spring Cloud Open Service Broker 2.0.0.M1. This new release has a Spring Boot 2 baseline, supports both Spring MVC and Spring WebFlux, and provides improved Spring Boot auto-configuration. If you're building service brokers for Cloud Foundry or Kubernetes, you're going to want to see this post. This is a must-read article by Spring Web team ninja Rossen Stoyanchev on the choice between Servlet APIs and reactive APIs for Spring users in Spring MVC and Spring WebFlux: "Spring MVC or Spring WebFlux, which should you use? A perfectly valid question, but one that sets up an unsound dichotomy". Java 10 is here! Congrats to the Java team! Get it while it's hot! This is the first release to support local type inference (var). The SivaLabs blog continues their look at microservices in Part 6, Distributed Tracing with Spring Cloud Sleuth and Zipkin. The Trampoline project has been updated to support Spring Boot 2.0. Asim Aslam likes Project Riff, the function-as-a-service offering from Pivotal. You might, too. IBM executive Eric Andersen, tweeting from the IBM Think 2018 event, looks forward to some of the exciting opportunities for Cloud Foundry and the Istio proxy. Dhiraj Ray has a nice post over on the Java Code Geeks blog on how to externalize configuration in a Spring application. Spring Cloud Contract lead Marcin Grzejszczak tweets that, thanks to Olga Maciaszek, you can now understand Spring Cloud Contract in 3 seconds or 3 minutes. There's also a 10-minute version and a roughly five-day version. Dan Newton has a nice post looking at using the new reactive web runtime Spring WebFlux. The SivaLabs series on building microservices with Spring Cloud looks, in this fifth post, on at using Spring Cloud Zuul. Robert Winkler has just released Resilience4j 0.12.0 which upgrades Vavr from Spring Boot from 1.4.3.RELEASE to 1.5.5.RELEASE, among many other dependencies. It also adds a reset method to Circuit Breaker, adds a disable and force_open states to Circuit Breaker, adds Project Reactor support for circuit breaker, bulkhead, and rate limiter, adds support for Micrometer, and ensures that the Reactor operators can be used together on a Flux. Check out our latest post about Spring Boot 2.0 and Micrometer on Touk Team Blog. Matt McCandless continues his look[...]

Manually Installing a Maven Artifact in Your Local Repository

Thu, 22 Mar 2018 10:01:01 GMT

I find myself once again in the situation where I have to install the Oracle JDBC driver into my local Maven repository. Usually, this is easily accomplished via:

mvn install:install-file -Dfile= -DgroupId= -DartifactId= -Dversion= -Dpackaging=

Types: When I Use Them, and When I Don't

Thu, 22 Mar 2018 07:01:01 GMT

Note: Below is my personal perspective.

If I write a one-page program, I don't mind having no types: 0 types, -1 types, I'm happy with it.

Java 10 Released: 10 New Features Devs Should Know

Thu, 22 Mar 2018 04:01:01 GMT

Hello all! While we all are talking about Java 9 and some people have yet to adopt Java 8 in their projects, here comes the new release of Java, the JDK 10. It's available to download now on Oracle's website. This is the first release in the new release schedule, where you have a new Java release every six months. I know it's quite early, but that's a reality now. Apart from the six-month releases, every three years, there will be an LTS release, which is sort of a major Java release. The next LTS release is Java 11, which should be out in September. So you can aim for that. Then you can update three years after that to the next LTS release.

Even though JDK 10 came along really quickly, there are some interesting features coming. I have yet to go into the details of them all, but prima-facie, they look useful and interesting to me.

Advanced Support for Java 9 Modules in IntelliJ IDEA

Wed, 21 Mar 2018 20:01:01 GMT

Since Java 9 was released, many conferences have hosted discussions around its new features and use cases. Our team couldn’t miss this opportunity to collect valuable community feedback on what Java 9 brings us. This feedback has inspired us to improve Java 9 support in IntelliJ IDEA. Specifically, navigation via gutter icons, as well as new warnings and related quick-fixes are coming to IntelliJ IDEA 2018.1. Let’s take a closer look at what’s already available.

As you may know, starting with Java 7, you can use Java services for loose coupling within a modular application. The API for that is provided by the java.util.ServiceLoader class. But in Java 9, modules are configured differently; specifically, uses and provides clauses should be declared in the module declaration file (the file). When using Java 9, before you load a service with ServiceLoader to access service implementations, you need to make sure that the uses clause is added in the fileIt’s also worth mentioning that when the service class provided as an argument of ServiceLoader.load() isn’t declared in the file, this leads to a runtime error.

CodeTalk: Where Java EE Lost Its Pace, Reasons to Be Optimistic About Jakarta [Podcast]

Wed, 21 Mar 2018 16:01:03 GMT

Thanks for tuning in to another episode of DZone's CodeTalk Podcast where you'll hear hosts Travis Van and Travis Carlson have early conversations with the creators of new developer technologies

Check back every Wednesday for a fresh episode, and if you're interested in being involved as a guest or have feedback for our hosts scroll down to the bottom for contact information.

Mastering Java 8 Streams (Part 1) [Video]

Wed, 21 Mar 2018 10:01:04 GMT

Java 8 Streams have been around for a while, but quite a few people still find streams to be a bit counter-intuitive and difficult to handle. It hasn't got to be that way and, in fact, being able to use streams reasonably is great for your code base.

This short, practical screencast is a quick, cookbook style intro on how to create streams and perform the most common tasks on them, like map, filter, distinct, and collect. 

Lightbend Podcast: sbt 1.x – The Past, Future, and Baby Steps

Wed, 21 Mar 2018 07:01:02 GMT

In this Lightbend podcast, we sit down with Marina Sigaeva (@BesseIFunction), a physicist, Scala engineer, and speaker of growing renown in the Scala community, and Dale Wijnand (@dwijnand), who is on Lightbend’s Tooling Team where he spends much of his day maintaining and writing about sbt.

Marina recently presented a talk called “SBT: Baby Steps”, so we asked to spend a bit of time with her and Dale discussing the latest on sbt, some of the history of this fascinating project, and see where things are heading in the future.

How Java EE Can Get Its Groove Back

Wed, 21 Mar 2018 04:01:02 GMT

One of the most intriguing developments in the Java landscape is the transition of governance of the Java EE platform from Oracle’s JCP process to Eclipse Foundation. We’re anticipating a reveal this summer of more details around the technical directions of Java EE from this new governance. To help DZone readers understand some of the key considerations ahead of how Java EE stays relevant in the new, distributed computing, cloud-native trends in enterprise computing, we caught up with Lightbend CTO, Akka creator and original author of the Reactive Manifesto, Jonas Bonér.

DZone: Other JVM languages like Scala — and the many frameworks that target distributed systems challenges like Akka — saw an opportunity to tackle use cases in new ways beyond the classic Java / Java EE approach. What would you say are some of the key ways that the Java ecosystem needs to evolve to keep evolving the Java / Java stack capabilities moving forward?

10 Java Interview Questions From Investment Banks

Tue, 20 Mar 2018 20:01:01 GMT

There are a lot of Java developers applying for Java development roles at investment banks like Barclays, Credit Suisse, Citibank etc, but many of them have no idea of what kind of questions are expected there.

In this article, I'll share some frequently asked questions from investment banks to Java developers of more than 3 years of experience. Yes, these questions are not for freshers or those with 1-2 years of Java experience — often, banks don't hire at that level via open interviews. Rather, they mostly join as graduate trainees.

New Parallax Control for Java (JavaFX)

Tue, 20 Mar 2018 16:01:02 GMT

Parallax is a visual effect where you combine two layered images moving at different speeds to achieve a sense of depth.

Think about when you're driving on the road and you see the trees close to you moving fast, whereas the trees that are further away will move in the same direction, but slower. The result is that you perceive the trees that are moving faster to be closer to you and the others to be further.

The Case of the Dreaded Interface

Tue, 20 Mar 2018 10:01:02 GMT

The Java/C# interface has a lot to answer for. Recently, someone told me that, "You can tell a design is coupled if it doesn't use interfaces." After a few follow-up questions, I realized that they were not talking about coding to well-defined contracts in general, but the Java or C# interfaces in particular. My next question was, "Should you have an interface even if there is only one implementation?" The answer was, "Yes if you think there may be more implementations in the future."

I disagree with this view.

A Kotlin Wishlist for Java

Tue, 20 Mar 2018 07:01:00 GMT

There is no doubt that Java has enjoyed a superior position when it comes to programming languages and is considered as one of the most important languages for development. However, there have been a number of languages developed on top of the JVM, like Kotlin.

Kotlin is a statically typed programming language for modern multi-platform applications. While I have been a Java developer for quite a long while, working on a project data-anonymization made me feel that there are things that Java should consider importing from Kotlin. 

Raw String Literals Coming to Java

Tue, 20 Mar 2018 04:01:00 GMT

It appears likely that "raw string literals" are coming to Java. JEP 326 ("Raw String Literals") started as Issue JDK-8196004 and was announced as a "new JEP candidate" on March 2. The JEP and associated issue point out that "Java remains one of a small group of contemporary programming languages that do not provide language-level support for raw strings." The JEP and associated issue specifically reference programming languages C, C++, C# ("verbatim"), Dart, Go, Groovy, Haskell, JavaScript, Kotlin, Perl, PHP, Python, R, Ruby, Scala, and Swift and the "Unix tools" bash, grep, and sed that were "surveyed for their delimiters and use of raw and multi-line strings." JEP 326's "Summary" provides an overview of the proposed Java raw string literals: "A raw string literal can span multiple lines of source code and does not interpret escape sequences, such as \n, or Unicode escapes, of the form \uXXXX." The "Motivations" section of this JEP adds, "This JEP proposes a new kind of literal, a raw string literal, which sets aside both Java escapes and Java line terminator specifications, to provide character sequences that under many circumstances are more readable and maintainable than the existing traditional string literal." JEP 326 does not introduce interpolation and, in fact, rules it out in its "Non-Goals" section: "Raw string literals do not directly support string interpolation. Interpolation may be considered in a future JEP."[...]

Changing the Default Port of Spring Boot Apps [Snippets]

Mon, 19 Mar 2018 20:01:01 GMT

By default, Spring Boot applications run on an embedded Tomcat via port 8080. In order to change the default port, you just need to modify the server.port attribute, which is automatically read at runtime by Spring Boot applications.

In this tutorial, we provide a few common ways of modifying the server.port attribute.

A Personal Opinion on the Future of Jakarta EE

Mon, 19 Mar 2018 07:01:01 GMT

The following is just my personal opinion of where Jakarta EE may be going. I am far removed from the decision makers and this opinion is based on what I have read and my experience as a teacher. Feel free to label me a crackpot.

I began to teach J2EE in 2002. It was a mess. Most of my time was spent on explaining the purpose of the numerous XML files and the three strange beans, session, session stateless, and EJB. Of course, this was in the days when it was thought that programs will be frequently reconfigured via their XML files and that pooling the strange beans was the state of the art. When I got a copy of Rod Johnson’s book J2EE Development without EJB, I thought that the concept was intriguing. However, I was required to teach what was most commonly used in industry, and at that time, it was J2EE.

Testing Kotlin With Spock (Part 1): Object

Mon, 19 Mar 2018 04:01:01 GMT

The object keyword in Kotlin creates a singleton in a very convenient way. It can be used, for example, as a state of an operation. Spock is one of the most expressive and readable test frameworks available in the Java ecosystem. Let's see how Kotlin's object can be used in Spock tests.

What Do We Want to Test?

We have a single method, validate, in our Validator interface that returns validation status: Ok or Error.

Doing Stuff With Spring WebFlux

Sun, 18 Mar 2018 05:01:02 GMT

Spring Boot 2.0 went GA recently, so I decided to write my first post about Spring in quite a while. Since the release, I have been seeing more and more mentions of Spring WebFlux along with tutorials on how to use it. But after reading through them and trying to get it working myself, I found it a bit hard to make the jump from the code included in the posts and tutorials I read to writing code that actually does something a tiny bit more interesting than returning a string from the back-end. Now, I’m hoping I’m not shooting myself in the foot by saying that, as you could probably make the same criticism of the code I use in this post, but here is my attempt to give a tutorial of Spring WebFlux that actually resembles something that you might use in the wild.

Before I continue, and after all this mentioning of WebFlux, what actually is it? Spring WebFlux is a fully non-blocking reactive alternative to Spring MVC. It allows better vertical scaling without increasing your hardware resources. Being reactive, it now makes use of Reactive Streams to allow asynchronous processing of data returned from calls to the server. This means we are going to see a lot less Lists, Collections, or even single objects. Instead, we'll see their reactive equivalents such as Flux and Mono (from Reactor). I’m not going to go in depth on what Reactive Streams are, as honestly, I need to look into it even more myself before I try to explain it to anyone. Instead, let's get back to focusing on WebFlux.

Streaming Microservices With Akka Streams and Kafka Streams [Webinar]

Sat, 17 Mar 2018 05:02:15 GMT

One of the most frequent questions that we at Lightbend have been asked is “what’s the difference between Akka Streams and Kafka Streams?” After all, there is only a 1 letter difference between these two technologies, so how different could they be?

Well, as we are about to learn, they are actually quite different. Both tools are part of Lightbend Fast Data Platform, but were created with entirely different technological approaches in mind. For example, Akka Streams emerged as a dataflow-centric abstraction for the Akka Actor model, designed for general-purpose microservices, very low-latency event processing, and supports a wider class of application problems and third-party integrations via Alpakka. Kafka Streams, by comparison, is purpose-built for reading data from Kafka topics, processing it, and writing the results to new topics in a Kafka-centric way.

Building Spring Boot 2.0 Apps: VS Code, Initializr, and Azure Starters

Fri, 16 Mar 2018 16:01:02 GMT

We are excited to announce full support of Spring Boot 2.0 on the Spring Boot Starters for Azure, already available on Spring Initializr. Plus, with new Java and Spring extensions for Visual Studio Code you can build production-ready apps and easily deploy them to the cloud.

Integrate Azure Services With Spring Boot 2.0 Apps

Spring Initializr enables developers to handle the dependency management and makes the bootstrapping process for Spring projects much easier. Today, we’re announcing that the Azure Starters have been updated to support Spring Boot 2.0, so you can easily integrate cloud services with your application.