Category "spring-boot"

Intellij complaining about property logging.file.path in SpringBoot

Running Springboot 2.5.9 and IntelliJ 2022.1. I have this in my application.yml: However, IntelliJ is complaining about the fact that logging.file is deprecat

Spring RestController - findById and findByEmail request method not working (Ambiguous handler)

I want to retrieve user's info either based on the ID or the Email. Below is the controller class I wrote: @RestController @RequestMapping("/users") public clas

How to solve "Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache' warning?

How to solve Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache, by adding it to the classpath. warni

How to configure port for a Spring Boot application

How do I configure the TCP/IP port listened on by a Spring Boot application, so it does not use the default port of 8080.

Spring.datasource.initialize=false not working

I am working on spring boot and batch application. Due to batch, the application tries to connect to datasource with spring-boot:run. I want to stop that and t

Micrometer - Prometheus Gauge displays NaN

I am trying to generate Prometheus metrics with using Micrometer.io with Spring Boot 2.0.0.RELEASE. When I am trying to expose the size of a List as Gauge, it

Resolving Pageable in Webflux

I spent a lot of time to find a solution about Pageable in Webflux, unfortunately, at the time of writing this, Webflux does not support Pageable so I came up w

Apache Server Reverse Proxy Issue

I have Microservices implemented using Spring Boot hosted in VM. I have Apache HTTP Server which act as load balancer and have configured reverse proxy to redir

How to view the metrics ready to be sent off to Datadog

So I am new to metrics and micrometer. I am have followed this tutorial in which we set up some basics Meters like a counter and a Gauge and expose the metrics.

Restarting inifinite Flux on error with pubSubReactiveFactory

I'm developing an application which uses reactor libraries to connect with Google pubsub. So I have a Flux of messages. I want it to always consume from the que

Predicate on a field of an entity class which is type of a parent class and filter on fields of its children

In the entity class A there is a field of type P1 named as p. Class P2 and P3 is extended from P1. In the predicate I want to filter the result based on a field

Zuul routing the requests through an external proxy server

Our current project requirement is to to route some requests to third-party external api servers. For this we are using spring zuul based router service. zuul:

Get org.hibernate.LazyInitializationException in spring boot integration test

I'm trying to write integration test for Spring Boot application. I have Product and GalleryImage domain model. They are in one-to-many relationship. public cl

Incompatibility between Spring Kafka consumers with versions 2.3.13.RELEASE and 2.8.3

I am having problems with kafka consumers of applications with different versions of Spring-kafka, specifically between 2.3.13.RELEASE and 2.8.3. When deploying

How to disable DefaultSecurityFilterChain in a Spring Boot app?

In my Spring Boot application, I have: @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { ... @Ove

Spring Cloud Gateway with Eureka discovery enable CORS policies

I've been searching on how to enable CORS when using Spring Cloud Gateway in addition with Eureka discovery. My application is up and running and everything wo

Incompatibility between Spring Kafka consumers with versions 2.3.13.RELEASE and 2.8.3

I am having problems with kafka consumers of applications with different versions of Spring-kafka, specifically between 2.3.13.RELEASE and 2.8.3. When deploying

Could not download Node.js from: https://nodejs.org/dist/v6.11.3/x64/node.exe: Got error code 404 from the server

When i tried build and clean my project pom.xml <configuration> <nodeVersion>v6.11.3</nodeVersion> <npmVersion>3.10.10</npm

Spring boot security, always redirects to login page, if navigate through address bar

I have a react project, and the security works fine untill I navigate within page - i.e. clicking buttons etc. But, if I refresh page, or input url directly int

Setting logback property via spring config + environment variable in spring config

I want to configure logback in such way that some specific appender will work only if system variable LOGGER_ENABLED is set to true. If the variable is not set