Questions tagged [spring-boot]

Use the Spring Boot tag for questions related to spring boot framework and the features it brings to your Web application. This includes questions about configuration, embedding of the Web servers, setting up metrics, health checks, externalized configuration etc. It does not include questions about the Web server itself, Java code running in your application, or standard spring components. Tag these questions with its own tags to get the best response!

spring-boot
Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Eureka Discovery client is not register under API-GATEWAY\host.docker.internal

I have used the Eureka discovery server for setting up the microservices. Initially, DiscoveryClient was registered under DiscoveryClient_API-GATEWAY/host.docker.internal:api-gateway. Now it has ...
Gnanaseelan's user avatar
0 votes
0 answers
10 views

Spring Java API returning byte[] variable with ""

Good day! My Api returns byte variable like this "..." but retrofit in my android application can read only like this [...] how can i change response. Entity: @Entity @Table(name = "...
user23864092's user avatar
0 votes
0 answers
15 views

Process 'command 'C:\Program Files\Java\jdk-17\bin\java.exe'' finished with non-zero exit value 1

i am getting below error while trying to start my java application. i configured java 17 in intellij and in environment variable. So just wanted to know, what is the possible reason of this error. ...
Durgesh gupta's user avatar
0 votes
0 answers
7 views

Jacoco Coverage in Multi-Module Gradle Project Not Including Submodules

I am developing a multi-module Gradle (8.7) project, structured such that one module acts as the main application, while the others are libraries used by this application. All unit tests are located ...
dragogian's user avatar
0 votes
0 answers
6 views

How to configure Spring WebClient to reuse access tokens

I'm trying to use the spring WebClient to access some OAuth2 secured REST services. It works but it seems that it does not reuse the access token between requests. I started with password grant and ...
Kristina's user avatar
0 votes
0 answers
12 views

Micrometer - Custom Gauge Metric Not Working

I am calculating latency in my application in milliseconds and recording with gauge but value is not updating after first time. (I am aware that Timer metric type can also be used for latency, but I ...
Yash Mehta's user avatar
0 votes
0 answers
21 views

Even though I added my SSL certificate, I get the "not secure" error

I programmed a rest API, purchased an SSL certificate with Java Spring Boot, and configured the SSL certificate into my project. I successfully started the project with https, but when I run it from ...
Burak Öztürk's user avatar
0 votes
0 answers
12 views

If I expand the Hazelcast repository with a method, what disadvantages do I have in comparison to expanding the service?

Hazelcast and the Application are both running in Kubernetes. I was wondering if there are any disadvantages of expand the Hazelcast repository with a method. In general and also regarding the JDK, ...
John Smith's user avatar
0 votes
0 answers
10 views

RedisConnectionFailureException intermittently

We observed RedisConnectionFailureException intermittently as mentioned in above stacktrace, quantum is around 2-3 per 15 mins, which is very low, but still it should not come ideally. As you can see ...
tusharRawat's user avatar
0 votes
0 answers
18 views

Websocket connection to wss:// failed

I have a web application deployed and served by Angular and Spring Boot running websockets. The client-side websocket is unable to connect, giving an error of 'Websocket connection to 'wss://url' ...
Testing's user avatar
0 votes
0 answers
8 views

RPA using robotframework in springboot

I have worked on java spring-boot but I don't have much knowledge about python so I was trying to have some worked around to make robotframework code trigger from springboot application and control ...
Aditi Dhal's user avatar
0 votes
0 answers
17 views

Unable to Print Jasper Report in Docker Container with Alpine-based OpenJDK Image

I am encountering an issue while attempting to print a Jasper report within a Docker container using an Alpine-based OpenJDK image. The application runs smoothly when using a non-Alpine base image, ...
Ameer Hamza's user avatar
-1 votes
0 answers
12 views

SecurityContextHolder.getContext().getAuthentication() is null

I am working on the Spring boot rest API with JWT Token to authenticate the requests. I have made multiple entries of Admin in DB and passing name as username, password as password in Basic Auth, but ...
Saksham Garg's user avatar
-1 votes
0 answers
14 views

Two rabbitmq queues with exactly same configuration one of them is not created automatically (Spring Boot 3 RabbitMQ)

I have 2 queues beans declared in one spring boot module, both queues have exactly same configuration in git. One of them is created automatically, but the second is not. Both queues have declared ...
Alchemisz's user avatar
0 votes
0 answers
18 views

DeferredResult Return 401

I am encountering an issue with DeferredResult returning a 401 error. I have set up Redis Pub/Sub to complete the DeferredResult. The issue arises when I call an endpoint that returns a DeferredResult....
ppusda's user avatar
  • 1
0 votes
0 answers
8 views

Bean Validaton : org.springframework.web.bind.MethodArgumentNotValidException

I have added validation constraints on fields of class which maps to the input fields of registration form, after invalid input I want to show same form with error message populated with it. I am ...
Shrikant Bochare's user avatar
0 votes
0 answers
8 views

I have spring boot services. i have to configure 2nd service database and Respository class to first service.How to achieve it?

2nd Service Repository and DB Connection @Repository public interface AuthUserRepository extends CrudRepository<AuthUserModel, String> { } spring.datasource.driver.class =com.mysql.cj.jdbc....
Durgababu Balepalli's user avatar
0 votes
0 answers
8 views

what are the benefits of deploying a spring boot application on an application server? [duplicate]

Spring boot comes with an embedded server that facilitates deployment. But based on my experience many companies are still using application servers to deploy their spring boot applications ( WildFly ...
santi cazorla's user avatar
-1 votes
0 answers
15 views

Uneven Load Distribution in Kubernetes Pods with Multithreaded Execution using fork join pool

I have a Spring Boot application where I had a CPU-intensive function performing 43 non-dependent function calls sequentially, resulting in significant execution time. To optimize performance, I ...
Aditya Tiwari's user avatar
0 votes
1 answer
28 views

Where I use @ExtendsWith(MockitoExtension.class) and @SpringBootTest anyone clarify me with example

I'm beginner in Spring boot till now I have complete the REST Operations(GET,POST,PUT,DELETE) with MYSQL as a database and I want to write the unit test cases for Controller class and Service class I ...
Karthikeyan C's user avatar
-1 votes
0 answers
12 views

spring boot kafka defaulterrorhandler setbackofffunction not working

I'm using kafka with spring boot, I'm trying to set custom backoff for particular exceptions. for example, if i face illegalargument exception i don't want to retry the record so in that scenario ...
raj's user avatar
  • 31
0 votes
0 answers
9 views

NonCollapse Image FCM using Java

if ((priority.equals("HIGH") || priority.equals("NORMAL")) && collapse_state.equals("collapse")) { log.info("if priority :" + priority + " ...
Sahil's user avatar
  • 37
-1 votes
0 answers
17 views

Spring JPA entity not persisting when using KafkaListener in Spring Boot app

I am working on a Kotlin Spring Boot application using Spring 3.2.1. My entity is not persisting to the database when I use @Transactional with @KafkaListener. The entity persists fine when I save it ...
amoh's user avatar
  • 161
-1 votes
0 answers
9 views

graphql-java extension type redefine error from version 15

I have remote-schema json for each module in my graphql router project and have classes to stitch those schema’s and generate the GraphqlSchema class. It was working fine till graphql-java 14. And it ...
Rajesh Rajendran's user avatar
0 votes
0 answers
9 views

Spring boot maven plugin and antlr4-runtime issue

When I run my application, below exception is being thrown while initialization. Caused by: java.lang.NoClassDefFoundError: org/antlr/v4/runtime/misc/ParseCancellationException at org.hibernate....
Abirami's user avatar
  • 283
0 votes
0 answers
12 views

Blocking call in @KafkaListener spring boot

When I am using spring @KafkaListener is there any difference if I subscribe to reactive flow: @KafkaListener(topics = "topic-name", groupId = "group-id", containerFactory="...
viktor nagla's user avatar
0 votes
0 answers
21 views

Problem when trying to access Google OAuth2 authentication URL (Java spring boot)

I'm trying to implement Google OAuth2 authentication on my spring boot and I'm following the specific documentation on a website that teaches how to do this using react and spring boot, but I'm ...
Laranja Saltante's user avatar
0 votes
0 answers
13 views

How can I protect an Java Spring boot API against Azure AD B2C if I only have an id_token?

I am trying to protect an API against Azure AD B2C based on the following scenario As you can see, the flow is as follows: 1.- A user puts its credentials in a login page of a web application 2.- The ...
Martinsiyo's user avatar
0 votes
0 answers
7 views

nodename nor servname provided, or not known executing GET http://ADMIN-API/user/5202

I'm unable to use feign-client without using url in open-feign client: This is my app.yaml file: spring: application: name: feign-client management: endpoint: health: show-...
andy's user avatar
  • 1
0 votes
0 answers
11 views

How to get different types of authentication in Thymeleaf

In my Spring Boot application i have two login types(form login and Oauth2.0) When i succesfully authenticate, into СontextHolder spring put UserDetails or OAuth2UserService depending on the type of ...
Anton Bondar's user avatar
1 vote
1 answer
26 views

Basic Spring Boot application always giving 404/Whitelabel error

My basic Spring Boot application is somehow returning only 404 on all endpoints and i'm unable to figure out why Main file @SpringBootApplication @EnableJpaRepositories("com.employee.*") @...
p0tta's user avatar
  • 1,561
0 votes
0 answers
26 views

javax validation not working on spring boot

Greetings to everyone, I know there are already threads on this topic but unfortunately they don't help me, also because it seems that everything is ok at the configuration level. I added the ...
Fede Ota's user avatar
-1 votes
0 answers
20 views

How to use Firestore on a Spring Boot application

I'm developing an application with Spring Boot that will be released on Cloud Run. Cloud Run containers are stateless, so to save user experience session information I thought of using Firestore. I ...
HalNap's user avatar
  • 33
0 votes
0 answers
10 views

No qualifying bean of type 'com.google.cloud.spring.pubsub.core.publisher.PubSubPublisherTemplate'

I have an application that uses Pub/Sub on GCP. Subscribing works without an issue however whenever I add private final PubSubTemplate pubSubTemplate; I get get an error that reads Error creating bean ...
Mike3355's user avatar
  • 11.7k
-2 votes
0 answers
13 views

How to set/pass socksProxy username and password environmental variable to a java program [closed]

How to set/pass socksProxy username and password environmental variable to a java program? I am not from programing background so not aware what's the right syntax to pass socksProxy username and ...
devops-admin's user avatar
  • 1,717
-2 votes
1 answer
24 views

How to access a class property by index string [closed]

I would like to know how to access a property in a class using a string. Something like this: class Permission, and the class has String canRead. Is there a way to access like: Permission permission = ...
Benjamin Laureano's user avatar
0 votes
0 answers
19 views

How to call a stored procedure from Spring Data JPA and map the result to a custom object without having a corresponding entity?

Question: I'm working on a Spring Boot project where I need to call a stored procedure from my database using Spring Data JPA. The stored procedure returns a result set that I want to map to a custom ...
SYED SAQIB S A's user avatar
0 votes
0 answers
14 views

How to hide type of model in swagger with springfox?

I have rest controller and method below @PostMapping(value = /createNewCredit, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<NewCreditResponse> createNewCredit( @...
Yuriy S's user avatar
0 votes
1 answer
18 views

Caused by: java.lang.IllegalArgumentException: authenticationManager must be specified

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationFilter' defined in file [mypath\security\filter\AuthenticationFilter.class]: ...
Fábio's user avatar
  • 1
-1 votes
0 answers
8 views

How do I use and access the operation name in a graphQL query using spring-boot-starter-graphql and GraphQlTester?

This is what i am using in my intergration tests: GraphQlTester.Response response = gqlTester .document(""" mutation updateSomething($id: ID!, $something: ...
user3629892's user avatar
  • 2,998
-2 votes
0 answers
10 views

Spring Actuator check - adding if-none-matches to header params

I am working on Spring Boot upgrade to 3.2. In this upgrade when the spring health check happens it triggers the health check URL as https://localhost:8443/actuator. The check fails with the error ...
Balachandar Thangavel's user avatar
0 votes
0 answers
15 views

How to authorize using Swagger-UI on Spring AuthorizationServer

I connect Swagger-UI using the springdoc-openapi-starter-webmvc-ui dependency Setting up Swagger configuration: @SecurityScheme(name = "security_auth", in = SecuritySchemeIn....
rellai's user avatar
  • 1
-1 votes
0 answers
15 views

Keycloak with Google login and role based access not working

I have a Spring Boot application using keycloak, I'm giving the option to the user to login via google, right now the user is able to login via google and the token is being generated, but when I ...
PauloRamos's user avatar
0 votes
2 answers
45 views

How to schedule cron job in spring boot to run for every 5 minutes with in specific period

I have the following code in spring boot, its working fine and job running for every 5 mins. I want it run between 9:30 AM to 5:30 PM for every 5 minutes. How to add the the specific time period for ...
Sivaram Chintalapudi's user avatar
-1 votes
1 answer
33 views

Reuse controller paths for a Spring Boot Controller

We have a Person class and in our Spring boot Controller for the Person class we have a few functions that have a path that starts with /person/{id} However, we want to reuse all those functions for ...
Renza Polza's user avatar
-1 votes
0 answers
25 views

hibernate.dialect property is not getting identified by my spring boot project

I have recently made few changes to my project to fix security vulnerablities Made Spring boot version 3.1.4 to 3.1.6 and then Spring web: 6.0.13 to 6.0.17 , tomcat-embed-core : 10.1.16 to 10.1.19 ...
Naseer Mohammad's user avatar
-1 votes
0 answers
9 views

GraphQL and springboot resolver mapping problem

I have created my schema and my resolver class and i implement GraphQLQueryResolver but it is not mapping it[enter image description here](https://i.stack.imgur.com/B5sGX.jpg) I tried injecting some ...
Abdulkadir Barambu's user avatar
0 votes
0 answers
12 views

Deploy Springboot app on heroku which is using google storage services

I have a springboot application which uses Google Cloud Storage Buckets. Now for the local development the default gcloud auth application-default login works fine but this app is to be deployed on a ...
MosterCode's user avatar
0 votes
0 answers
12 views

Illegal access: this web application instance has been stopped already. Could not load [org.apache.logging.log4j.message.SimpleMessage]

I'm trying to run Spring Boot + Hibernate + REST application from external Tomcat 9.0.0 server. When running locally from Intellij (which also uses embedded Tomcat server) everything works fine, but ...
Robert Ćwiertnia's user avatar
-1 votes
0 answers
15 views

Cross-Origin Request Blocked from socket.io.js in springboot application

I have cloned a video-call GitHub project and trying to use it with an IP address over HTTPS but the request is blocked on the browser from socket.io due to Cross-Origin. I set up a local domain(127.0....
user565's user avatar
  • 978

1
2 3 4 5
2960