Category "spring-boot"

Docker WARNING: Published ports are discarded when using host network mode

I have a Springboot app that I have Dockerized. I have it exposed on port 8081, and can access it as expected. http://<ipaddress>:8081 Problem The Spring

Spring Boot JDBC microservices cannot connect to MySQL in docker

I have 2 Spring Boot microservices that need to connect to a MySQL service which itself is deployed in Docker. I'm using Docker Compose but for some reason they

org.springframework.boot.web.reactive.error.DefaultErrorAttributes is not getting called anymore in org.springframework.boot:2.3.1.RELEASE

Spring reactive web: Earlier in spring boot 2.2.*, i was using a class that extends DefaultErrorAttributes. This class was used to handle exceptions globally fo

Pushing metrics data to Prometheus

I am configuring Prometheus to access Spring boot metrics data. For some of the metrics, Prometheus's pull mechanism is ok, but for some custom metrics I prefer

Web socket CORS issue in SpringBoot

I was working on implementing web sockets in springboot, I followed the example spring has given in there docs. But I am getting cors error while trying to conn

vault in spring return Status 403 Forbidden [secret/data/inquiry]: 1 error occurred: * permission denied

when I send curl request to vault server, everything works fine curl --request PUT --header "X-Vault-Token:..." -k --data @db.json https://localhost:8200/v1/sec

How do you disable the auto generated pages /login and /logout using Spring SAML2?

I am using Spring Boot - 2.6.6 and Spring Security - 5.7.0-M2 with the spring-security-saml2-service-provider library to create a SAML service provider applicat

GetMapping endpoint for a button which takes inputs from 2 text fields

I have a basic html page with 2 textboxes and a button. I need to make the button respond after the entries in the textbox The body of the html looks like this

not able to use ai.djl.modality.cv.util.BufferedImageUtils in my application

I am new to AI technology .I dded every DJL which are required to my project . But when I go to use ai.djl.modality.cv.util.BufferedImageUtils. I am not able t

How do I share an object between two or more WebSocket controllers in Spring Boot?

I have two controllers, namely ControllerA and ControllerB. In ControllerA I have an object (a HashMap) which maps principal names for connected users to their

Spring Boot "FirebaseApp with name [DEFAULT] doesn't exist."

Launching Spring Boot's jar file throws me these errors: Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with n

Ignore SSL certificate verfication while connecting to elasticsearch from SPRING BOOT via high level rest client

Is there a way to ignore SSL certificate verification while connecting elasticsearch 7.4 using high level rest client. I explored a couple of options but nothin

Display only default message of Spring boot validation - MethodArgumentNotValidException

How can i strip down the excessive information from MethodArgumentNotValidException and keep only the required "default message" ?? I am experimenting with Val

Cannot get percentiles or value from Aggregation

The parentSalaries is a list of Buckets of size 1 and contains Aggregations of size 2, which are "precentials_salary" and "avg_salary". I am trying to get the

Unable to store ManyToOne association for an entity

I am unable to bind foreign_key baz_id to Baz on a POST call, it fails with a instantiation error trying to store a bar POST http://localhost/foo/api/v1/bars {

org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: java.lang.String cannot be cast to java.lang.Enum

I have a Spring boot application. spring-boot-starter-parent 2.3.0.RELEASE I'm trying to get a list of objects and expect to get something like this: { "i

Add trace.id and transaction.id Springboot

I have a Springboot micro-service. For logging I'm using Elastic common scheme, implemented using ecs-logging-java. I want to set the trace.ID and a transactio

Looking for something similar to Laravel Livewire for Spring Boot

I am looking to use Spring Boot for my next project and I am unable to find something that offers similar functionality to Laravel Livewire, does anybody know i

javax.validation.ValidationException Error

Error: Caused by: javax.validation.ValidationException: HV000183: Unable to initialize 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on

Error: Could not find or load main class - When running a JAR at the prompt

I'm looking all afternoon how I can run a JAR of a Spring Boot application I'm developing. Generated the JAR through the mvn clean package command. The JAR is g