Home » Tag Archives: Spring (page 7)

Tag Archives: Spring

Skip SSL certificate verification in Spring Rest Template

spring-interview-questions-answers

How to skip SSL certificate verification while using Spring Rest Template? Configure Rest Template so it uses Http Client to create requests. Note: If you are familiar with sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target the below should help you. Http Client Firstly, import HttpClient (>4.4), to your project compile('org.apache.httpcomponents:httpclient:4.5.1') Configure RestTemplate Configure SSLContext using Http Client’s ...

Read More »

Spring-managed Transactions Explained – Part 2 (JPA)

spring-interview-questions-answers

In the first part of the series, I showed how transactions work in plain-vanilla JDBC. And then I showed how Spring manages JDBC-based transactions. In this second part of the series, I’ll show how transactions work in plain-vanilla JPA first. And then show how Spring manages JPA-based transactions. Funds Transfer To help illustrate transactions, I’ll be using the same case ...

Read More »

One Thing Good Spring Developers Know

spring-interview-questions-answers

In my recent training sessions on the (core) Spring Framework, I was asked, “If there was one thing that a (Java) Spring developer should know, what should that be?” That question caught me off guard. Yes, the (core) Spring Framework does cover a lot of areas (e.g. beans, configuration, aspect-oriented programming, transactions). And it was difficult for me to point ...

Read More »

Advanced config with configuration meta-data in Spring Bootstrap

spring-interview-questions-answers

After a short introduction to configuration meta-data and covering the basics in my previous post called Pimp your config with configuration meta-data in Spring Boot, it is time to take a look at how to take this one step further and further customize the configuration. In this post, I plan to present deprecation of a configuration property and discuss various value ...

Read More »

Web service application with JAX-WS and Spring

spring-interview-questions-answers

1. Introduction It has been a long wait, but I am finally publishing a tutorial on creating the first SOAP based web service application with Spring. JAX-WS (Java API for XML Web Services) is a set of APIs for creating web services in XML format, which we also most commonly call as SOAP based web service, which hope we all are aware of ...

Read More »

Isolating integration tests and mocking dependencies with Spring Boot

spring-interview-questions-answers

Integration tests can be slow and unreliable because they depend on too many components in the system. Up to a certain point, this is unavoidable: integration tests are here to validate how each part of your system plays with other internal or external components. We can, however, improve some integration tests by only spinning up the required dependencies, instead of ...

Read More »

Spring Cloud Ribbon – Making a secured call

spring-interview-questions-answers

Something simple, but I struggled with this recently – I had to make a Netflix Ribbon based client call to a secured remote service. It turns out there are two ways to do this using Netflix Ribbon, I will demonstrate this through Spring Cloud’s excellent support for Ribbon library. In two previous blog posts I have touched on Spring Cloud ...

Read More »

Exception Handling in Spring RESTful Web Service

spring-interview-questions-answers

1. Introduction We might have been across some of the several ways by which we can handle exceptions in a RESTful web service application in Spring. In this article, we will try to explore the best approach we can take to achieve efficient exception handling. 2. Problem Statement Let’s create a simple application that will identify the employee name in the ...

Read More »

Dockerizing Spring Boot Application

docker-logo

Docker here, Docker there, I see Dockers everywhere In this post I will describe process of migrating Spring Boot application to Docker. We will start with modifying build file, then we will create Dockerfile so it could be run locally. Finally we will publish our image in DockerHub. Introduction A few months ago I have started new personal project called ...

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:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials