Category "spring-boot"

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

Spring Batch ChunkRequest throws stackOverflow

I am struggling with Spring Batch RemoteChunking with newer versions of Spring boot. First i try to send ChunkRequest as event, it wasn't possible because it ha

Spring Boot MongoDB the field with version annotation does not increment

This question asked several times before, but the answers in these questions didn't work for me. This is my Book document @Document @NoArgsConstructor @ToString

Spring Cloud Stream - Is there a way to customize the StreamThread thread name?

I'm using Spring Cloud Stream (Kafka as the binder) in my current project and the default thread name for StreamThread keeps me bothered as it is very long. Her

Java 17 with Maven Wrapper results in Unrecognized VM option 'MaxPermSize=512m'

I use OpenJDK 17 with Maven Wrapper 3.8.2 from Spring Initializr (Maven project, JAR packaging, Java 17, Spring Boot 2.6.0). No additional dependencies. user@D

How to disconnect a Stomp client Session from Spring

I know how to disconnect Sessions from Client Side, but I couldn't find a way to disconnect my session from my Spring Boot Backend. I've already seen the follow

required a bean of type 'org.springframework.cloud.netflix.ribbon.SpringClientFactory' that could not be found

I have this test project which I would like to migrate to more recent version: @Configuration public class LoadbalancerConfig extends RibbonLoadBalancerClient

I need to implement a circuit breaker on Spring Data REST (SDR) controllers

Can I create a custom Aspect for it? or should I create custom controllers? But I assume that would make using SDR pointless since I'd have to write everything

Rest API response as XML format, calling from Spring Boot with Resttemplate

I have created Rest API using Spring Boot & Data JPA. It's working fine if requested from Postman responds as JSON format, but when I request from coding us

How to write valid JSON data in logs in java Spring Boot

Logs file currently "message":"{\"productID\":\"999\",\"productName\":\"Shoes",\"productCost\":\"1200\"}" the data is fine but JSON format it not valid Code cur

When Shiro integrates JWT, what Shiro filter should be extend?

When I want to integrate JWT with Shiro, I need to write a filter extend Shiro's filter class For example AuthenticatingFilter BasicHttpAuthenticationFilter Ac

Why iterate data twice in java

In my program all work properly but problem is the total like get twice for one user i try to iterate properly but i am not succeed i can try to solve this prob

How to register a ApplicationEnvironmentPreparedEvent in Spring Test

I have a @SpringBootTest and I need to notified via ApplicationEnvironmentPreparedEvent to create a database file if it not exists, because my application datab

java.sql.SQLException: Column 'serialnumber' not found. (spring boot)

I am writing to-do list web app with spring boot. I Have 2 entities: User (fields: userid (ID), username, password Item (fields: serialnumber (ID), task, userid

gRPC file upload detect content type of file on server

I am trying to do a file upload on via client streaming gRPC. Sending a file via streaming from client to server. I have implemented this code for server side w