Latest Questions tagged Spring Boot

Browse all latest questions tagged Spring Boot

Published 26 Oct, 2022
Java - How to merge two execute two reactor fluxes in parallel that return lists and merge the results

I have a LegacyAccountDto that I need to build a list of from two separate sources. One is a local JPA repository and the other is a web service call. The web service version has the accountStatus a...

Published 26 Oct, 2022
Java - Logs are not loading according to

I am upgrading to Log4j to Log4j2 in my project. I have put in the classpath, and its loading. Despite that logs are not coming according to properties defined in

Published 19 Sep, 2022
Java - Connecting to Heroku Postgres from Spring Boot

I'm looking for the simplest, cleanest way of connecting to Heroku Postgres in a Spring Boot app using JPA/Hibernate. I don't see a good, complete example for this combo in either Heroku or Spring Bo...

Published 16 Sep, 2022
Java - Load balancer does not have available server for client: meeting

While I am trying to reach the service meeting via Zuul gateway, Zuul is unable to forward the request to the respective service. The following errors are what I am facing: nettflix.zuul.except...

Published 16 Sep, 2022
Java - org.mockito.exceptions.base.MockitoException: Please ensure that the type 'UserRestService' has a no-arg constructor

I want to create JUnit5 tests for Rest API. @Test public void resetRequest_NAME_AND_EMAIL_MISMATCH() throws Exception { when(userRestService.resetRequest(anyString(), anyString())).thenReturn(Boo...

Published 14 Sep, 2022
Java - StackOverflow error when building Maven project

I'm working on a 3 project solution which is broken down as below : Common : holds all common classes such as Service and Dao classes, Entities and all the common libraries both projects use such as...

Published 14 Oct, 2022
Java - Why Keycloak in Spring Boot allow an (expected unauthorized) user?

I'm trying to using Keycloak with Spring Boot and I configured Keycloak with two user: user1 with a role "user" and user2 with a role "not-user". I expect that when I call the endpoints with user1 ev...

Published 07 Sep, 2022
Java - SpringBoot no main manifest attribute (maven)

When running my jar file: java -jar target/places-1.0-SNAPSHOT.jar I'm getting the next error : no main manifest attribute, in target/places-1.0-SNAPSHOT.jar The pom.xml contains the spring-boot-mav...

Published 06 Sep, 2022
Java - Environment variables for list in spring boot configuration

For my Spring Boot application, I am trying to use an environment variable that holds the list of properties.topics in application.yml (see configuration below). properties: topics: -...

Published 18 Sep, 2022
Java - Why is SpringBoot upgrade from 2.3.0 to 2.5.0 failing to start tomcat with Prometheus exceptions?

Previous SpringBoot upgrades have been painless, but our upgrade to 2.5.0 doesn't start. Here's the sort version of the exception: Caused by: org.springframework.beans.factory.UnsatisfiedDependencyE...

Published 30 Sep, 2022
Java - SSLHandshakeException: Certificate Unknown (Java Spring Boot & Android)

I have a Spring Boot API that runs locally, with a self-signed certificate, using the HTTPS protocol. Obviously, when I send GET Requests from the browser, I receive the io.netty.handler.codec.Decode...

Published 10 Oct, 2022
Java - Default value as Duration at @Value

I need to specify default value for an instance variable which is of type java.time.Duration The default value which I pass is being read as String, causing IllegalStateException My class public cl...

Published 23 Oct, 2022
Java - Spring boot security to allow all endpoints except one

For a project that has no spring security. All controllers (GET/POST) of the project are not secured and should stay unsecured. But now, I have a new Controller and i want to secure its path (/private...

Published 21 Oct, 2022
Java - MicroService Architecture : CORS Configuration results in Access Control Allow Origin header contains multiple values

I am developing a spring boot application. In which it has API-Gateway and three microservices. When I call API from UI it throws an error of CORS. Error: Access Control Allow Origin header contains m...

Published 18 Aug, 2022
Java - Servlet.service() for servlet [dispatcherServlet] in context with path

I am getting below error while creating spring maven rest webservice. It works fine when i use postman to test post request on the api for ocbc. But when i tried to do post request for citi, i got the...