Home » Tag Archives: Spring

Tag Archives: Spring

Spring XD for Data Ingestion

spring-interview-questions-answers

Spring XD is a powerful tool that is an installable set of Spring Boot services that run either standalone, on top of YARN or on top of EC2. Spring XD also includes an admin UI website and a command line tool for job and stream management. Spring XD is a powerful set of services that work with a variety of ...

Read More »

Spicy Spring : Different ways of Autowiring

spring-interview-questions-answers

I would like to show different ways of using Spring’s @Autowired annotation: Constructor, Method and Field autowiring. The examples I show are all a form of byType autowiring mode (constructor autowiring mode is Analogous to byType). Take a look at the Spring Reference guide for more information on the Autowiring modes. Constructor Autowiring Create a constructor with a dependent bean ...

Read More »

Using rx-java Observable in a Spring MVC flow

spring-interview-questions-answers

Spring MVC has supported asynchronous request processing flow for sometime now and this support internally utilizes the Servlet 3 async support of containers like Tomcat/Jetty. Spring Web Async support Consider a service call that takes a little while to process, simulated with a delay: public CompletableFuture<Message> getAMessageFuture() { return CompletableFuture.supplyAsync(() -> { logger.info("Start: Executing slow task in Service 1"); Util.delay(1000); ...

Read More »

Spring Batch Tutorial – The ULTIMATE Guide

spring-interview-questions-answers

This tutorial is about Spring batch, which is part of the Spring framework. Spring Batch provides reusable functions that are essential in processing large volumes of records, including logging/tracing, transaction management, job processing statistics, job restart, skip, and resource management. It also provides more advanced technical services and features that will enable extremely high-volume and high performance batch jobs through ...

Read More »

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 »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close