Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

Get Started with Spring Boot, OAuth 2.0, and Okta

spring-interview-questions-answers

Build faster with Okta’s authentication and user management API. Register today for the free forever Developer Edition! If you’re building a Spring Boot application, you’ll eventually need to add user authentication. You can do this with OAuth 2.0 (henceforth: OAuth). OAuth is a standard that applications can use to provide client applications with “secure delegated access”. It works over HTTP ...

Read More »

Top 20 Online Programming Courses to Boost your Career

Do you want to know what is the best investment you can make with your time and money? Knowledge As a software developer you should be constantly acquiring new skills. This is the best way to advance your career and enjoy the rewards (monetary, emotional etc.). Towards that direction you should be reading books, devouring technical articles and staying informed ...

Read More »

Hosting WordPress Application on an EC2 Instance – AWS

In this post, we will deploy WordPress Application on an EC2 Amazon Linux AMI t2.micro instance following below steps: Step 1: Set up Amazon EC2 instance following set-up-amazon-ec2-instance. Step 2: Launch an EC2 instance following ec2-launch-linux-instance. Step 3: As creating a wordpress application is not a part of this post, I already created one and zipped it as wordpress-app.zip which ...

Read More »

Who needs Java modules after all ?

Jigsaw questions for 1000. I as an X want JPMS modules. What is X if it’s not a platform developer? My answer is that X is a human being (minus platform developers, because that was a condition). We all need module system to have safer code resulting in more reliable systems resulting in better performance in the business resulting in ...

Read More »

Running Parallel Tests in Docker

Sometimes when you are running your tests on your CI environment, you want to run tests in parallel. This parallelism is programmed in build tool such as Maven or Gradle or by using Jenkins plugin. If you are using Docker as a testing tool for providing external dependencies to the application (for example databases, mail servers, ftp servers, ….) you might find a big ...

Read More »

Effective Java – Creating and Destroying Objects

Creating and Destroying Objects (Ch 2) This is a short summary of Joshua Blochs book Effective Java chapter 2. I have only included items that are relevant for myself. Static Factories (item 1) Some advantages of static factories vs constructors: Factory methods have names which add a description to the constructor They can return pre-constructed object instead of always returning ...

Read More »

Effective Java – Method Common to All Objects

Methods Common to All Objects (Ch 3) This is a short summary of Joshua Blochs book Effective Java chapter 3. I have only included items that are relevant for myself. The general equals() contract (item 8) The equals contract describes the equivalence relation as: x.equals(null) == false Reflexive – x.equals(x) == true Symmetric – if x.equals(y) == true then y.equals(x) ...

Read More »

Voxxed Days – Athens 2017 – short review #vdathens

Yesterday I had the pleasure to attend the very first Voxxed Days Athens. As I have written 6 months ago while attending Voxxed Days Thesalloniki, this was the day I’ve waiting for too many years, a  proper conference, with top class speakers on the main IT hub of Greece, Athens. Once again, congrats to Patroklos Papapetrou and the team around Voxxed Athens, at ...

Read More »

Mocking Spring Security Context for Unit Testing

spring-interview-questions-answers

Today, while writing unit test case for one of the Java method which looks like below: public ApplicationUser getApplicationUser() { ApplicationUser applicationUser = (ApplicationUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); return applicationUser; } I want to mock Spring Security Context to get the Principal, to achieve the same I mocked each level of method calls as follows: import org.junit.Before; import org.junit.Rule; import org.junit.Test; import static org.mockito.Mockito.when; ...

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