Category "spring-boot"

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

how to playback audio blob from Spring boot App

I am storing an audio blob(recorded voice) in angular and then I am calling a spring boot API to store it in azure blob storage as so: submit(){ const

Parsing two objects into one

I've two objects objclient and objserver of the same type Object,(i.e. Dog, Cat..) when I receive objclient in my endpoint I need to replace its attributes with

Pass custom parameter to ConstraintValidator

I'm working on this springboot application where I need to do some validations on values passed from http call and I'm using class level validation as explained

Using Rate Limiting doesn't add Header to response and gets CORS error in client

I'm trying to adapt this tutorial to my server using the Bucket4j Spring Boot Starter. I'm using an application.properties file. I can limit the api queries wit

How to use google font in thymeleaf pdf template

I am using this to integrate google font Roboto in my thymeleaf pdf template. But no effect is coming in pdf <link th:href="@{http://fonts.googleapis.com/css

First time SQL query is taking More time from Spring Boot application

I have to fetch some records and then display in output. In my Spring Boot Application, I am using JPA Specification for creating Criteria and then calling repo

Custom message for Type Mismatch validation error while using Spring Boot and Hibernate Validator

Controller public String dummyAction(@Valid @ModelAttribute DummyInputData inputData) { return "success"; } Entity public class DummyInputData {

How to mix endpoints from an application with external plugins using spring boot and pf4j?

I have created a spring-boot application (2.6.4) and I want to integrate some plugins using p4fj. I have used p4fj before in non spring boot applications, but I

Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null

I'm trying to run Springdoc with Spring Boot 2.6.7. Configuration: @Configuration public class SwaggerConfiguration { @Bean public GroupedOpenApi publicA

How to override custom Jackson deserializer in child project?

In our company library (say lib-a) we have an interface: public interface MyInterface { ... } and its default implementation: public enum DefaultMyImpl imp