Home » Tag Archives: Spring (page 5)

Tag Archives: Spring

Improving performance: non-blocking processing of streams

spring-interview-questions-answers

1. Introduction Imagine we have an application that needs to access an external web service in order to gather information about clients and then process it. More specifically, we can’t get all this information in a single invocation. If we want to look up different clients, we will need several invocations. As shown in the graphic below, the example application ...

Read More »

Spring Boot Integration Testing with Selenium

selenium-logo

Web integration tests allow integration testing of Spring Boot application without any mocking. By using @WebIntegrationTest and @SpringApplicationConfiguration we can create tests that loads the application and listen on normal ports. This small addition to Spring Boot makes much easier to create integration tests with Selenium WebDriver. Test Dependencies The application that we will be testing is a simple Spring ...

Read More »

Introduction to Spring profiles

spring-interview-questions-answers

So many men, so many minds. When we are implementing software for different customers we sometimes need to handle various requirements for the same project. For example Customer A needs SAML authentication and customer B needs LDAP authentication. With Spring Profiles (available from Spring 3.1) we are able to provide a way to segregate parts of our implemented application configuration. ...

Read More »

Using Spring managed Bean in non-managed object

spring-interview-questions-answers

We have to deal with legacy code, even when we would like to use the best and newest technologies available. Imagine the new code is written with the newest technologies of the Spring Framework and the legacy code is not written in Spring at all. Then using Spring managed Beans in non-managed Spring objects is one of the patterns we ...

Read More »

Netflix Archaius properties in a Spring project

spring-interview-questions-answers

Archaius Basics Netflix Archaius is a library for managing configuration for an application. Consider a properties file “sample.properties” holding a property called “myprop”:               myprop=myprop_value_default This is how the file is loaded up using Archaius: ConfigurationManager .loadCascadedPropertiesFromResources("sample"); String myProp = DynamicPropertyFactory.getInstance().getStringProperty("myprop", "NOT FOUND").get(); assertThat(myProp, equalTo("myprop_value_default")); Archaius can load property appropriate to an environment, consider ...

Read More »

Integration testing on REST urls with Spring Boot

spring-interview-questions-answers

We are building a Spring Boot application with a REST interface and at some point we wanted to test our REST interface, and if possible, integrate this testing with our regular unit tests. One way of doing this, would be to @Autowire our REST controllers and call our endpoints using that. However, this won’t give full converage, since it will ...

Read More »

Java Bootstrap: Dropwizard vs. Spring Boot

spring-interview-questions-answers

How to get a production ready Java application off the ground in the shortest time possible? I’m not a morning person, so sometimes it takes a while for the “all systems are go” cue to kick in. This used to be true for Java applications until not too long ago, but unlike the invention of the snooze function on the ...

Read More »

Quick Start: Spring Boot and WildfFly 8.2 on OpenShift

redhat-openshift-logo

A really “Quick Start” with Spring Boot, WildFly and OpenShift as opposed to my last, more descriptive article. Prerequisite Before we can start building the application, we need to have an OpenShift free account and client tools installed. Step 1: Create WildFly application To create an application using client tools, type the following command: rhc create-app <app-name> jboss-wildfly-8 --scaling This ...

Read More »

Openshift: Build Spring Boot application on Wildfly 8.2.0 with Java 8

jboss-wildfly-logo

OpenShift DIY cartridge is a great way to test unsupported languages on OpenShift. But it is not scalable (you can vote for Scalable DIY cartridge here) which makes it hard to use with production grade Spring Boot applications. But what if we deployed Spring Boot application to WildFly Application Server? Spring Boot can run with embedded servlet container like Tomcat ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.