Home » Java

Java

Spring Security and Multiple Filter Chains

java-interview-questions-answers

Spring Security is an immensely useful technology. It allows you to secure your application without being too intrusive and allows to plug with many different authentication mechanisms. On the other hand it is not that easy to get into and one of those tools that I have to relearn each time I am touching it. In this post I’ll describe ...

Read More »

What is javax.ws.rs.core.context? [ Part 5 ]

java-interview-questions-answers

How to use the @Context annotation In part 4 of What is javax.ws.rs.core.context? you learned about using the @Context annotation to inject the HttpServletResponse and the HttpServletRequest classes into resource methods. In this article, you will learn about using the remaining two classes that are only available in a servlet container, they are: javax.servlet.ServletConfig and javax.servlet.ServletContext. Query the Servlet Container’s Configurations in ServletConfig The Servlet container contains ...

Read More »

What is javax.ws.rs.core.context? [ Part 4 ]

java-interview-questions-answers

How to use the @Context annotation In part 3 of What is javax.ws.rs.core.context? you learned how to use the @Context annotation with Request and Configuration, Providers, and Application instances. In this article, you will learn about using the @Context annotation to inject the HttpServletResponse and the HttpServletRequest classes. Get Access to the HttpServletRequest Properties The JAX-RS API runs on top of Servlets and ...

Read More »

Spring Cloud Config Series Part 3: Zookeeper Backend

java-interview-questions-answers

In this part of the series, we take a look at how we can use Spring Cloud Config with Zookeeper to manage our configuration. Introduction I’ve always found it hard to define what Zookeeper is. This is the definition given in its website ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. ...

Read More »

Spring Cloud Config Series Part 2: Git Backend

java-interview-questions-answers

After the first part of the series, where we looked at a Spring Cloud Config introduction, in this post we’ll look at a concrete implementation with a Git backend and the different options available using this backend. Introduction As we saw previously, one of the factors in the Twelve Factor App Manifesto was to move the configuration out of our ...

Read More »

Spring Cloud Config Series Part 1: Introduction

java-interview-questions-answers

I’m a big fan of the Spring Cloud set of tools. I’ve been using them for a while both in a professional capacity (though quite limited) and a personal one. If you have not used it before, you should try it out. You’ll see how convenient it is to set up a Micro-service environment where your applications can follow the ...

Read More »

What is javax.ws.rs.core.context? [ Part 3 ]

java-interview-questions-answers

How to use the @Context annotation In part 2 of What is javax.ws.rs.core.context? you learned how to use [email protected] annotation to retrieve security information from an injected instance of the SecurityContext class and how to use JAX-RS resource class via an instance of ResourceContext. In this article, you will learn about using the @Context annotation with Request and Configuration, Providers, and Application. Request ...

Read More »

Generating backpressure-aware streams with Flowable.generate() – RxJava FAQ

RxJava is missing a factory to create an infinite stream of natural numbers. Such a stream is useful e.g. when you want to assign unique sequence numbers to possibly infinite stream of events by zipping both of them: Flowable<Long> naturalNumbers = //??? Flowable<Event> someInfiniteEventStream = //... Flowable<Pair<Long, Event>> sequenced = Flowable.zip( naturalNumbers, someInfiniteEventStream, Pair::of ); Implementing naturalNumbers is surprisingly complex. In RxJava ...

Read More »

New Regex Features in Java 9

I recently received my complimentary copy of the book “Java 9 Regular Expressions” from Anubhava Srivastava published by Packt. The book is a good tutorial and introduction to anyone who wants to learn what regular expressions are and start from scratch. Those who know how to use regex the book may still be interesting to reiterate the knowledge and to ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns