Skip to main content

All Questions

Tagged with
-1 votes
1 answer
32 views

Base URL for Spring Boot and handle / as well

I would like to set the context path for the Spring Boot application, and the following property can achieve that. server.contextPath=/api However, I would like to redirect / to /api . Currently, I ...
Sanchu Varkey's user avatar
1 vote
1 answer
38 views

How can I test a Java method that hits the actual REST API?

So I have a class that holds a bunch of methods(migrated from another project) that are suppose hit a REST API,but I don't know if they are working correctly.I want to create a driver class that i ...
e_wards's user avatar
  • 35
-1 votes
0 answers
20 views

limit on the number of calls per minute for FeignClient

Call @FeignClient happens throw RetryTemplate.execute(). for example: public AccountBalanceHistoryDto getAccountBalanceHistoryByDate() { for (int i = 0; i < 100; i++) { ...
Aleksandr Berestov's user avatar
0 votes
0 answers
16 views

Access denied for user 'root'@'localhost' (using password: YES). In SpringToolSuit4 [duplicate]

enter image description hereI am working on the springToolSuite4,I was creating Restful API and trying to access the database through it. I have added all the dependencies and the password used is ...
Gauri Sharma's user avatar
0 votes
0 answers
24 views

How to easily expose endpoints in a format like Spring Data REST?

I use SDR in our project and it generates hundreds of endpoints, but whenever I create a endpoint manually i struggle to make all those links to all the entities, is there an easy way to do this ? My ...
Aspiring Dev 23000's user avatar
1 vote
0 answers
107 views

Best Practices for RBAC/ABAC in REST API with mandatory and optional attributes [closed]

I am currently working on a REST API where we've traditionally indicated which fields are mandatory and which are optional in the response or DTO. This has been straightforward as each endpoint had a ...
MelleD's user avatar
  • 781
0 votes
2 answers
46 views

How to expose endpoints of a spring application which is deployed on production servers?

While working with springboot in local environment, creating a REST application feels so effortless due to its embedded (and abstract) tomcat server. We can do so by creating a Restcontroller and ...
Moneet's user avatar
  • 13
0 votes
0 answers
37 views

How can I resolve [org.springframework.web.HttpMediaTypeNotAcceptableException: No acceptable representation] error?

I have created a REST API for user registration using Spring Boot in which I for response I'm using GenericResponse class along with ResponseEntity to manipulate the response but I'm facing [org....
Saurabh's user avatar
  • 19
0 votes
0 answers
36 views

Java and Mockito Testing: ValidatableResponse and ValidatableResponseOptions

I'm relatively new to Java testing and have a problem. I'm about to test a Rest client. I tested successfully all methods - put, get, delete. After I extended my delete method for a specific purpose I ...
user25924792's user avatar
0 votes
0 answers
32 views

Springboot application and single page app: HTTP Status 405 – Method Not Allowed: post data not sent by browser

Configuring springboot for a single app page wasn't easy. I thought to meet a standard problem when debugging an react embedded in a springboot application. I read all the the posted questions about ...
sssimon's user avatar
  • 103
0 votes
0 answers
34 views

Maven Jersey Project error org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor aroundWriteTo SEVERE: MessageBody

org.glassfish.jersey.message.internal.WriterInterceptorExecutor First of all, the problem started with me using the @XmlRootElement annotation on my Object class to return XML. The video i was ...
Yash Singh's user avatar
0 votes
1 answer
38 views

Spring Boot: Error uploading image with Axios

Question: I'm currently working on a Spring Boot application where I have a News entity with fields like title, description, date, and image. Initially, I was able to send data for title, description, ...
Hamza Oguz's user avatar
1 vote
1 answer
58 views

Spring Boot RestClient does not work when sending an object

I tried sending a POST request using Spring Boot 3 Http RestClient. The request fails when sending and object and passes when sending a string. Works with string code: private final String ...
user25486013's user avatar
0 votes
1 answer
62 views

How to use import in JavaScript while using Spring Boot

I ve been looking for a way to use import Chart from 'chart.js/auto' in my webpage. Im currently using Spring Boot, with Thymeleaf. Problem is, none of the things I tried worked. I have a node_modules ...
Felix Caba's user avatar
0 votes
0 answers
44 views

x-www-form-urlencoded POST requests in Spring Boot 2.7.18

The next snippet is from a project that has been working on Spring Boot v1.5.6, but it has recently been upgraded to Spring Boot v2.7.18 (along with other dependencies) It represents the endpoint to ...
BarkingViking's user avatar

15 30 50 per page
1
2 3 4 5
495