Home » Java » Page 28

Java

Spring Security

spring-interview-questions-answers

There are many authentication mechanisms (basic, digest, form, X.509, etc), and there are many storage options for credentials and authority information (in-memory, database, LDAP, etc). Authorization depends on authentication and determines if you have the required Authority. The decision process is often based on roles (e.g. ADMIN, MEMBER, GUEST, etc). There are three steps to set up and configure Spring ...

Read More »

Apache Camel 3.7 (LTS) Released – The fastest Camel ever

The Apache Camel 3.7 was released some days ago. This is a LTS release which means we will provide patch releases for one year. The next planned LTS release is 3.10 scheduled towards summer 2021. So what’s in this release This release introduces a set of new features and noticeable improvements that we will cover in this blog post. Pre ...

Read More »

Jakarta MVC 2.0 Released

java-interview-questions-answers

Jakarta MVC 2.0 passed the release review ballot and is now ratified as a final specification according to the Jakarta EE Specification Process (JESP). The last steps for the project team after the ballot are to release the staged artifacts to Maven Central and verify that all published information is correct. That has now been done, and I have listed ...

Read More »

JDK 16: Stream to List In One Easy Call

As Java functional streams have become increasingly popular, an increasing number of requests is being made for new stream operations to be supported. Amidst these requests for numerous disparate new operations, one operation that seems to be requested more than the others is an operation that directly provides a List from a Stream. JDK 16 Early Access Build 27 introduces ...

Read More »

Java’s String.repeat Method in Action: Building PreparedStatement with Dynamic Number of Parameters

Java’s String.repeat(int) method is an example of a “small” addition to Java (introduced with JDK 11) that I find myself frequently using and appreciating. This post describes use of JDK 11-introduced String.repeat(int) for easier custom generation of SQL WHERE clauses with the appropriate number of “?” parameter placeholders for use with PreparedStatements. Many Java developers do not need to manually ...

Read More »

HATEOAS without links

java-interview-questions-answers

Yes, I know this title sounds stupid, but could not find something that fits better. So let me explain why I think that links in HATEOAS APIs are not always that useful. If you don’t know what HATEOAS is, I recommend reading my Introduction to Hypermedia REST APIs first. REST APIs with HATEOAS support provide two main features for decoupling ...

Read More »

Testing using TestContainers

java-interview-questions-answers

Part of our everyday ci/cd tasks involve using containers in order for the tests to take effect.So what if you could control the containers you use through your tests and serve your scenarios better.Also what if you could do this in a more managed way? Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common ...

Read More »

Apache Camel 3.7 – Compiled Simple Language (Part 6)

I have previously blogged about the optimizations we are doing in the Apache Camel core. The first 3 blogs (part1, part2, part3) were a while back leading up to the 3.4 LTS release. We have done more work (part4, part5) and this (part 6) that will be included in the next Camel 3.7 LTS release (to be released this month).  This time we ...

Read More »