Home » Java » Enterprise Java (page 2)

Enterprise Java

Upgrading Spring Security OAuth and JUnit Tests through the πŸ‘€ of a Java Hipster

spring-interview-questions-answers

β€œI love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. Using unit and integration tests to verify your code quality is an excellent way to show you care about your code. I recently did a bunch of ...

Read More »

Thoughts on the Jakarta EE package name change

java-interview-questions-answers

The Eclipse Foundation announced that Jakarta EE cannot continue to use the javax package name. Apparently this comes with the fact that while Java EE bases on this name, no further modifications are allowed to classes or packages starting with that name. While this is certainly bad news, for me, the bad news already started when it was announced that ...

Read More »

The Kubernetes Spark operator in OpenShift Origin (Part 1)

This series is about the Kubernetes Spark operator by Radanalytics.io onOpenShift Origin. It is an Open Source operator to manageApache Spark clusters and applications.In order to deploy the operator on OpenShift Origin, the first time you need to clone the GitHub repository for it: git clone https://github.com/radanalyticsio/spark-operator.git Then login to the cluster using the OpenShift command-lineoc: oc login -u <username>:<password> ...

Read More »

Multiple Cache Configurations with Caffeine and Spring Boot

spring-interview-questions-answers

Caching is key for performance of nearly every application. Distributed caching is sometimes needed, but not always. In many cases a local cache would work just fine and there’s no need for the overhead and complexity of the distributed cache. So, in many applications, including plain Spring and Spring Boot, you can use @Cacheable on any method and its result ...

Read More »

Functional Hystrix using Spring Cloud HystrixCommands

spring-interview-questions-answers

Spring’s WebClient provides a non-blocking client for making service to service calls.Hystrix, though now in a maintenance mode, has been used for protecting service to service calls by preventing cascading failures, providing circuit breakers for calls to slow or faulty upstream services. In this post, I will be exploring how Spring Cloud provides a newer functional approach to wrapping a ...

Read More »

Spring @Value Annotation

spring-interview-questions-answers

Introduction: Spring @Value annotation is used to inject values into variables and method arguments. We can either read spring environment variables or system variables. It also supports SpEL. In this quick tutorial, we’ll explore how to work with Spring @Value annotation. Setup: Let’s start by first defining a few properties in our app.properties file: user.first.name=Sam user.stocks=50 user.address=California user.preferences=A,B,C products.count={P1: '3', ...

Read More »

Maven Dependency Scopes

Introduction: Managing dependencies is a core feature of Maven. When defining a maven dependency, the scope attribute defines the visibility of that dependency on different maven lifecycle phases such as build, test and run. The dependency scopes limit the transitivity of dependencies in any project, thereby affecting the classpath. Also, there are six different available dependency scopes in Maven. In ...

Read More »

Spring Boot Error – Error creating a bean with name ‘dataSource’ defined in class path resource DataSourceAutoConfiguration

spring-interview-questions-answers

Hello guys, If you are using Spring Boot and getting errors like “Cannot determine embedded database driver class for database type NONE” or “Error creating a bean with name ‘dataSource’ defined in class path resource ataSourceAutoConfiguration” then you have come to the right place. In this article, we’ll examine different scenarios on which this Spring Boot error comes and what ...

Read More »