Category "spring-boot"

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

Spring Boot: start liquibase changes only once Tomcat started

Right now, my Liquibase scripts are integrated in my product (a Spring boot application). I would like to know if there is an easy way to postpone the Liquibase

In java map, I want to assign the repository functions as value like Map<key, function(>

I Want to call the JPA repository functions to access the data from the database based on the String value passed. So I want to make the string as the key and t

RabbitMQ not working when services are dockerized

So I have 2 services. Kweet (which is a tweet) and User. When I run the 2 services manually + rest of the services in docker, it works. Rest of services include

Spring batch: How to output list as output for RepositoryItemReader

Hi I have a use case where I should read data from DB and try to combine rows. For example I have one order and many orderDetails. The output of my SQL Query is

How can we assign a field of user table say id that is primary key, to another table as a primary key? using hibernate

See I dont want any mapping but what I want is just a simple thing that is.... I have two Entity Tasks(taskid,taskname.....,userId) User_Credentials(userId,pass

Java Stream a Large SQL Query into API CSV File

I am writing a Service that obtains data from large sql query in database (over 100,000 records) and streams into an API CSV File. Is there any java library fun