Home » Tag Archives: Spring (page 2)

Tag Archives: Spring

Spring and Threads: TaskExecutor

spring-interview-questions-answers

Using threads in a web application is not unusual especially when you have to develop long running tasks. Considering spring we must pay extra attention and use the tools it already provides, instead of spawning our own threads. We want our threads to be managed by spring and thus be able to use the other components of our application without ...

Read More »

Separate keyspaces with Spring Data Cassandra

Following on from my previous post Getting started with Spring Data Cassandra we will look into using multiple keyspaces within an application. This will be a relatively short post due to most of the content being covered in the earlier post allowing us to focus on the code needed to allow multiple keyspaces and reasons why you might want to ...

Read More »

Converting XML to JSON & Raw Use in MongoDB & Spring Batch

Overview Why convert XML to JSON for raw use in MongoDB? Since MongoDB uses JSON documents in order to store records, just as tables and rows store records in a relational database, we naturally need to convert our XML to JSON. Some applications may need to store raw (unmodified) JSON because there is uncertainty in how the data will be ...

Read More »

Spring Cloud – Basic setup

spring-interview-questions-answers

Spring Cloud solves common problems of distributed systems. However, for someone who works only with widely known monolith applications jumping into the long list of patterns designed for distributed services might be quite overwhelming at the very beginning. This article will take you through the basics of Spring Cloud by taking a practical approach. After finishing, not only you should ...

Read More »

Secure Spring Boot REST API using Basic Authentication

spring-interview-questions-answers

This is the third post of my Spring Boot Blog post series. In the very first post, I talked about my experience with creating RESTFul Services using Spring Boot. Then I have expanded the sample to integrate with Swagger documentation. In this post, I am going to expand above sample with security aspect. What is API Security API Security is a ...

Read More »

Getting started with Spring Data Cassandra

I have recently been learning Apache Cassandra to use at work and I think it is about time I consolidated my experience within a blog post. But rather than focusing on how Cassandra works itself this post will look at how to use Spring Data Cassandra. I know I just said I wouldn’t focus on how Cassandra works, but if ...

Read More »

Spring Batch CSV Processing

spring-interview-questions-answers

Overview Topics we will be discussing include the essential concepts of batch processing with Spring Batch and how to import the data from a CSV into a database. 0 – Spring Batch CSV Processing Example Application We are building an application that demonstrates the basics of Spring Batch for processing CSV files. Our demo application will allow us to process ...

Read More »

Differences between @RequestParam and @PathVariable annotations in Spring MVC?

spring-interview-questions-answers

The Spring MVC framework, one of the most popular frameworks for developing a web application in Java world also provides several useful annotations to extract data from the incoming request and mapping the request to controller e.g. @RequestMapping, @RequestParam, and @PathVariable. Even though both @RequestParam and @ParthVariable is used to extract values from the HTTP request, there is a subtle ...

Read More »

Asynchronous and Transactional Event Listeners in Spring

spring-interview-questions-answers

The built-in event publication functionality exists from the early Spring versions and it is still useful for handling basic communication between Spring components in the same application context. In general, the application can generate application events (that can be arbitrary objects) and listen to them. The whole mechanism is really simple: using ApplicationPublisher you publish events and using EventListener you ...

Read More »