Category "spring-boot"

spring boot transactional integration for event management

We have recently put a REST Spring Boot MVC application into production. We are using JPA with Postgresql in order to achieve some nonfunctional requirements: w

How to write test cases for Service layer using Junit 4 and mockito

My Repository layer is returning list object, But in my service layer i am filtering out all other and return a single Object. when i try to create test cases i

How i can duplicate a record with your dependents in spring boot

In my use case I need to create an endpoint that duplicates a record and its dependents by copying the data from the current record to a new record creating new

Is using @CrossOrigin the same as overriding addCorsMapping() in Spring?

In my controller I currently added the following annotation @CrossOrigin: @RestController @RequestMapping(value = "/dev/test") @CrossOrigin publ

Trust a Certificate Authority in Java

I'm trying to consume some webservices in my Spring boot Applications, I got this error in swagger when I try to execute my request, I tried to search for the u

Keycloak login based Authorization and authentication of application user

I am new to keycloak , whether the user creation should be happened in my application or at keycloak

How to call scheduler from Main Class

My application have two schedulers one runs every day at a particular time and another scheduler every day at and interval of 1 hour. I have added the cron exp

Strange behaviour of the exception handler on spring boot RestControllerAdvice handleExceptionInternal

Trying to save 2 times the same barcode card the method saveBarcodecard (left side image) throw the error: SQLIntegrityConstraintViolationException: "Duplicate

how to calculate size of S3 bucket if size is more than GB using java

I am not able to calculate S3 bucket size if it is more than 300GB. I have used below code to calculate no of objects and bucket size. it is working for bucket

Connect Heroku Add-on MySQL Database to DigitalOcean droplet for Spring Boot

Have anyone deployed Spring Boot app to DigitalOcean droplet? I have previously created app on Heroku.com, where I also ordered MySQL Database and deployed my W

Use Stream return type in Spring Boot controller lead to "java.sql.SQLException: Closed Resultset: next"

When streaming result from JpaRepository to Rest API, I have an exception "java.sql.SQLException: Closed Resultset: next" I am Using Spring boot, Spring Data JP

Does blob storage checkpoint require for service bus binder?

I have a springboot application configured to use service bus queue binder to connect to A Service Bus queue. Recently I have upgraded "azure-spring-cloud-strea

Duplicate tomcat logs

Have spring boot app with only one dependency spring-boot-starter web and want to see tomcat logs for that i added to logging.properties that handlers = 1catali

How to handle reactive types within Reactive Spring Integration?

I'm playing a little with Reactive Spring Integration and I try to perform the following basic operation: @Override protected IntegrationFlowDefinition&

How to use Eclipse collection in Spring boot ResponseEnity in Java

So I need help in using java eclipse collections as part of the response using the spring boot Response Entity JSON . I have tried using the generic way but I g

CucumberBackendException: No qualifying bean of type

When trying to run step defs with abstract class contains all the context configuration spring sees 2 differnt beans parent and stepdef I'm using spring boot ve

Unable to read file using classpath in AKS

We are migrating the project from PCF to the AKS cluster. We are unable to read the file from the resource folder using classpath in AKS while it is working fin

What can i do to not re-run gradle spring boot application again and again

I've one gradle spring boot project. Even if i'd to put one log at some place. It requires re-run of the application. Is there anyway to add these type of chang

Why are singleton beans created twice in Spring?

I have a spring-boot project that contains a BookMapper bean: import org.apache.ibatis.annotations.Mapper; @Mapper public interface BookMapper { // some CR

Kafka EOS retry flag

I have a Kafka cluster and a spring boot application that is configured for EOS. The application consumes from topic A performs some business logic then produce