Category "spring-boot"

Why does using 'Optional<>' give me the next error'Failed to convert from Optional to Mono?

I am doing a functionality that allows you to save users, but before that it does a validation to validate if the nick exists in the database, when I run I get

Spring boot addFlashAttribute not displaying message in HTML

I've been searching here and online how to use addFlashAttribute in the best way and it's not working for me no matter what I do. I have a Student model which I

JPA: Data integrity violation instead of Upsert

I have this entity with these fields and this primary key: @Getter @Setter @Entity @Builder @NoArgsConstructor @AllArgsConstructor @Table(name = "MY_TABLE", sch

Exception never seems to get thrown when an AxisFault is found

I have this catch statement: } catch (Exception e) { if (e instanceof AxisFault) { LOGGER.info("AxisFault: " + e); if (((AxisFault) e).getFa

CORS requests blocked when hitting k8s service exposing Spring Boot API

I currently have an Angular application trying to call a Spring Boot application with simple HTTP queries. Both of the applications are running on their own pod

Is the latest Spring cloud task incompatible with spring-boot 2.6.6?

I am trying to use the spring-cloud-task-core version 2.4.1 with the spring-boot version 2.6.6 (from the 2021.0.x release train). This is showing me the below e

Spring environment variable values computing

Can I somehow use environment variable to set a properties value, but using computing, something like this: test2: ${TEST+1:2} test: ${TEST:1} As you can see

Hibernate- Liquibase throwing exception : java.lang.UnsupportedOperationException: The application must supply JDBC connections

I am trying to generate changelog based on DB and Entity class My Liquibase properties file is as follows `url=jdbc:h2:mem:testdb changeLogFile=classpath:/db/ch

Given an assignment to return specific data using Springboot reactive but the JSON is really complicated

I am new to Springboot reactive I was asked to call the following endpoint and return todays weather data only: https://api.weather.gov/gridpoints/MLB/33,70/for

Only allow updating JPA entity when @version attribute matches

I have two classes, a file and an attachment. There is a version attribute on the file and it has a onetomany relationship. I have written code to upload/add at

error at building spring native image (JmxMBeanServer)

I'm trying to build my spring boot application as a native image, but every time I try to build I get an error. my current build.gradle is https://paste.sv-stud

Autowiring inside jackson serializer if used by RestTemplate

I have an @Autowired in one of my Serializers which extends StdSerializer public class RefSerializer extends StdSerializer<LabeledElement> { @Autowir

Testcontainers, Localstack SES and Publishing to SNS

I'm using Spring Boot 2.6.3, with testcontainers version 1.16.3 and aws-java-sdk version 1.12.178. I'm trying to create an Integration test using testcontainers

Thymeleaf can't find templates

I have a Spring Boot Thymeleaf Java project that works perfectly in my local git. Thing is, I tried to clone this same project from my GitHub repository and now

Embedded Kafka contract tests randomly failing

I am using the spring cloud contrat to test a kafkaListsener of my service. I use EmbeddedKafka together with the spring cloud contract. The listener in my serv

Authorization concept "user has permissions according a special project" with oauth2.0/keycloak/OIDC/openapi/spring boot

I try to secure a spring boot/React app, that communication is generated by openapi over keycloak with oauth2.0/OIDC. But my security-architecture is more compl

How to configure other client redirect_uri's than '/sso/login' for Spring Boot client app?

I would like to avoid the default '/sso/login' redirect uri but instead be able to configure custom redirect URIs for my Spring Boot application. I have added s

Consider defining a bean of type 'Mapper' in your configuration [Spring-Boot]

mapstruct doesn't work on my Spring Boot project. I added dependencies, path, Mapper annotations (componentModel="spring") in the mapper interface and still get

Getting project error when removing dependency

I have 3 different projects. Project A , Project B & Project C. Project B contain some model classes as well as other classes & Project C contain only d

SwaggerUI is defaulting to version 2 when a Springboot project is generated using openapi generator cli jar

I am trying to generate a spring boot project using the below yaml file with openapi generator cli jar openapi: 3.0.0 info: title: Dealer Management System