Category "spring-boot"

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

How to map specific column in entity class

I have two tables Users and UserRoles. These are the entity class I have created, @Entity @Table(name="users") public Users { @Id @Column(name = "id") private

Openapi Generator. How to generate method with HttpServletResponse as parameter?

everyone. I use strategy "Design first". I describe specification. One of the methods accepts HttpServletResponse as paramether. But i don't know ho to describe

Passing ReactiveSecurityContext into GraphQL - How to enable Spring @PreAuthorize annotation for Reactive Resolvers

After I migrated to Reactive GraphQL, Spring ReactiveSecurityContext is not accessible in GraphQL. The question here is, how I can use Spring @PreAuthorize anno

Failed to deduce bean type for org.springframework.boot.actuate.autoconfigure.metrics.JvmMetricsAutoConfiguration.jvmHeapPressureMetrics

I am trying to upgrade Spring-boot from 2.2.5.RELEASE to 2.6.6 and I am encountering few issues with spring-boot-starter-actuator dependency. This service runs

Spring Cloud Discovery First Configuration Server Decryption Failed

I am trying discovery first implementation with Spring Cloud. I am getting failure for password decryption. I have .jks in the classpath. The same works when I

Spring Boot: Optional mapping of request parameters to POJO

I'm trying to map request parameters of a controller method into a POJO object, but only if any of its fields are present. However, I can't seem to find a way t