Home » Spring Boot » Page 10

Tag Archives: Spring Boot

Cached Prepared Statements with Spring Data Cassandra

Today I have a short post on using Prepared Statements in Spring Data Cassandra. Spring provides you with some utilities to make using Prepared Statements easier rather than relying on registering queries manually yourself with the Datastax Java Driver. The Spring code provides a cache to store prepared statements that are frequently used. Allowing you to execute your queries via ...

Read More »

How to bind @RequestParam to object in Spring

spring-interview-questions-answers

Do you have multiple parameters annotated with @RequestParam in a request mapping method and feel it isn’t readable? The annotation looks pretty straightforward when there’s one or two input parameters expected in a request but when the list gets longer you might feel overwhelmed. You cannot use the @RequestParam annotation inside objects but it doesn’t mean you’re left with no ...

Read More »

Containerising a Spring Data Cassandra application

I’m continuing my journey of learning Docker. I am still keeping it simple at this point. This time around, I am going to tackle converting a Spring and Cassandra application to use containers instead of running locally on the host machine. More precisely, using Spring Data Cassandra to sort out the application. I wish I looked at doing this change ...

Read More »

TIP: Activate via URL and Send Arguments

spring-interview-questions-answers

The most secure password in the world is the one that doesn’t exist. You remove the user from the equation with a completely random key. To be fair this has some drawbacks and a password still exists somewhere (in your phone/email) but generally this works rather well…​ The trick is simple, if we want to authenticate a user we can ...

Read More »

Spock 1.2 – hassle-free Spring beans mocking in integration tests

spring-interview-questions-answers

Discover how to automatically inject Spock’s mocks and spies into the Spring context using Spock 1.2. Stubs/mocks/spies in Spock (and their life cycle) have been always tightly coupled with the Spock Specification class. It was only possible to create them in a test class. Therefore, using shared, predefined mocks (in both unit and integration tests) was problematic. The situation was ...

Read More »

Knative Serving – Service to Service call

spring-interview-questions-answers

In a previous post I had covered using Knative’s Serving feature to run a sample Java Application. This post will be go into the steps to deploy two applications, with one application calling the other. Details of the Sample The entire sample is available at my github repository – https://github.com/bijukunjummen/sleuth-webflux-sample. The applications are Spring Boot based. The backend application exposes ...

Read More »