Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
85 views

I just want to get my custom message in Swagger response (not just "Bad Request") @RestController @RequestMapping @RequiredArgsConstructor public class GenUrlController { private final ...
J.J. Beam's user avatar
  • 3,233
0 votes
1 answer
152 views

I recently upgraded to Spring Boot 3.5 (Jakarta packages) and noticed my global exception handler isn’t being triggered. @RestController public class UserController { @GetMapping("/test")...
Lavi Kumar's user avatar
1 vote
1 answer
83 views

I use Spring Boot 3.3.4 and Java 21. I have several Spring Boot web application that use the same common library : App1 App2 App3 Common In this common library, I have a @RestController used to ...
Valrog's user avatar
  • 163
1 vote
1 answer
69 views

With the use spring boot 3.4.7 noticing a below change We have a pojo with lomobok annoatiaon import org.springframework.validation.annotation.Validated; @Builder @Validated public record AppState( ...
Tim's user avatar
  • 1,521
0 votes
1 answer
70 views

I am having trouble binding custom key and value map after migrating to 6.x where binder.getTarget() comes out to be null. I debugged and it turnes out binder target is set later point of time. Is ...
secret129's user avatar
  • 221
2 votes
0 answers
43 views

I am integrating Neo4j into my JHipster 8.5.0 / Spring Boot 3.3.0 application. I have configured a Neo4jConfig with a Driver bean, a Neo4jService to send Cypher statements, and a REST endpoint /api/...
Mouhamad Moustapha Mbaye's user avatar
0 votes
0 answers
80 views

I have a Restcontroller with a parameter with a LocalDate like this: @RequestParam @Schema(requiredMode = REQUIRED) @NonNull final LocalDate startDate When calling the endpoint with a Swedish ...
Perty's user avatar
  • 921
0 votes
1 answer
48 views

We are getting a request from 3rd part and in our logs the body is printed like this "body":"Response=%7B%22TransactionType%22%3A1%2C%22Approved%22%3Afalse%2C%22TransactionIdentifier%22%...
Arun Sudhakaran's user avatar
1 vote
0 answers
23 views

I am working through the Amazon Junior Dev Certificate on Coursera and finishing up the course on Spring Boot APIs. The current lab I am working on is requiring me to write unit tests for a ...
Joseph Loomis's user avatar
0 votes
1 answer
183 views

I have a Spring Boot REST API, and it works perfectly when tested via Postman—all HTTP methods function as expected. However, when I try to interact with the API from the client-side application, I ...
TheRealKing's user avatar
0 votes
0 answers
84 views

I am switching to Java/Spring from another development stack and I am very confused about how in Spring some things are done. One of the issues is the magical conversion of request body parameters ...
chumakoff's user avatar
  • 7,094
0 votes
2 answers
52 views

I have a Restcontroller with 4 methods, but I can't use the calls, I always get the error: "message": "No static resource api/corp.", I need method with string like: localhost:...
Gilmar's user avatar
  • 67
1 vote
2 answers
282 views

I am checking examples of Htmx + Spring. All examples use server-side template engines ( like Thymeleaf or Jte). Htmx expects an HTML response from Spring, but Nowadays, most Spring applications ...
Kirtan Patel's user avatar
0 votes
1 answer
470 views

We have a REST controller with a HEAD method but no GET method. We don't want the client to be able to retrieve the resource, but we do want them to be able to know whether it exists and how big it is....
whistling_marmot's user avatar
1 vote
3 answers
121 views

I’m working on a Spring Boot application, and I’m having trouble getting my controller to register correctly. When I try to POST data to the /student/add endpoint, I receive a 404 error, indicating ...
Madeline Lobdell's user avatar
0 votes
1 answer
491 views

I have built a simple spring rest application that has just one rest controller. DemoRestController.java: import java.util.Arrays; import java.util.List; import org.springframework.http.MediaType; ...
Shri's user avatar
  • 191
0 votes
1 answer
115 views

` I'm trying to test the login method by adding a user, and when I want to login, I get a 401 response insted of 200 UserController /** * Login form * @param user the user we are trying to log in ...
Marius Carchilan's user avatar
1 vote
2 answers
175 views

I've noticed some odd behavior with my SpringBoot micro service. I'm using spring mvc, springboot 3.3.3 and Java 21. Consider the following code in a Controller (annotated with @RestController and ...
0xREDACTED's user avatar
0 votes
1 answer
282 views

I know within the Spring @RestController class, we can do something like: @GetMapping("/" public ResponseEntity<Weather> getWeatherRecordsById(@PathVariable Integer id){ ...
PainIsAMaster's user avatar
0 votes
1 answer
85 views

I have created a project with spring boot and MongoDB as database. I am trying to hit a get request to fetch the data that I have saved in the database. For fetching that I am passing an id from the ...
Steve Rogers's user avatar
0 votes
1 answer
75 views

Spring Boot 3.2.x / Spring Web 6.1.x In an app with both MVC controllers (returning HTML pages via JSP) and REST controllers, how can I implement global exception handling such that MVC controller ...
E-Riz's user avatar
  • 33.7k
0 votes
1 answer
45 views

org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class com.eprocurement.common.beans.ResponseBean] and content ...
MM Vadhaniya's user avatar
0 votes
1 answer
51 views

I have a spring-controller with a post-endpoint that receives a WordDto. Another get-endpoint puts a list of WordDtos in the ModelMap and shows a jsp-file. In the jsp-file, I show each entry of the ...
Fi0x's user avatar
  • 183
0 votes
2 answers
64 views

I have a java service which is built on jaxrs and it is returning the response based on url extension. For example: http://localhost:8080/employees returns xml by default, http://localhost:8080/...
sravan ganji's user avatar
  • 5,193
0 votes
2 answers
212 views

I need to log trace information using a Tracer bean, which is request-scoped, in both my REST method and exception handler. The Tracer bean is consumed in the REST method to log the trace information ...
MiguelSlv's user avatar
  • 15.4k
-1 votes
1 answer
43 views

I'm trying to build a simple registration web app using reactJS and Spring Boot. However, database(Postgresql) doesnt seem to be receiving anything. here is my frontend submit code, where REGISTER_URL ...
daronoh's user avatar
  • 11
-1 votes
1 answer
114 views

I am using spring boot 2.7.6, Gradle 8.6 and here is the application.properties file spring.mvc.servlet.path = /v3 spring.mvc.throw-exception-if-no-handler-found = true spring.mvc.static-path-pattern=/...
Test Email's user avatar
0 votes
1 answer
70 views

Let's assume, I have 2 REST Endpoints and the second of them calls internally first one. The POST endpoint will behave like normal GET endpoint, but because of very large Set of dependentCategories, I ...
Dawid's user avatar
  • 348
1 vote
0 answers
40 views

I have two rest controllers on the same package level with following code: First controller: @Slf4j @AllArgsConstructor @RestController @RequestMapping(API + NO_AUTH + "/payments/...
Pranay Tripathi's user avatar
0 votes
1 answer
220 views

I am writing the backend part of an application in which I want to implement the ability to accept and validate for each object in the list. I know about two annotations that can do this: @Valid is ...
BogdanPhoenix's user avatar
0 votes
0 answers
63 views

In multipart formdata we accept the parts as with key-value pairs, is it possible to handle request with file without any key? curl --location --request GET 'endpoint' --form '=@"/C:/Users/User/...
Akash Rawat's user avatar
-2 votes
1 answer
69 views

I'm working on a fun project with some random person data (from java-faker) to learn more aboud java, spring, api, thymeleaf, softwaretests... -> my-project-from-gitlab Besides many small problems ...
kasper2083's user avatar
0 votes
1 answer
101 views

Im trying to create my own LoginController so i can watch the data flow more closely, but either my post method is wrong or my controller is missing something. Whenever I try to send a login request ...
Ganbalv's user avatar
3 votes
3 answers
835 views

I have the following @RestController: package io.github.paulmarcelinbejan.coandaairlines.reservationsystem.adapters.inbound.controller.rest; import java.util.List; import org.springframework.http....
Paul Marcelin Bejan's user avatar
0 votes
1 answer
82 views

public Page<DemoDto> find( @QuerydsPredicate(root = DemoEntiy.class) final Predicate predicate, @PageableDefault(size = 100) @SortDefault(sort = "id", direction = Sort....
DEEPAK MALIK's user avatar
0 votes
1 answer
36 views

is it bad to have pojo for all supported filter params in search api rather than taking each one with @RequestParam . Let's say i have api for search car and supported filter for cars brand , model ,...
Rahul Kumar's user avatar
0 votes
1 answer
343 views

I have a spring boot (3.2.1) application that run on java 17. I also have library that contains @Entity annotations. I am connection to database using spring boot default Hibernate. I am able to ...
Fleky's user avatar
  • 11
0 votes
1 answer
184 views

I have a case, where I need to get access token without http call to predefined by Oauth Spring Security /oauth/token endpoint, but instead, have a call for some api, available for the anonymous user, ...
Eljah's user avatar
  • 5,443
0 votes
3 answers
171 views

application properties: # Database Connection Properties spring.datasource.url=jdbc:mysql://localhost:3306/quizmaker spring.datasource.username=root spring.datasource.password=Corona@123 # Specify ...
Deepa Lakshmi.l's user avatar
1 vote
2 answers
312 views

Description: Parameter 0 of constructor in com.example.service.QuestionService required a bean of type 'com.example.Dao.QuestionDao' that could not be found. Action: Consider defining a bean of type '...
Deepa Lakshmi.l's user avatar
0 votes
1 answer
68 views

I have a Map<Object, List> property. It correctly persists to SQL and a Spring Boot Repository correctly returns the Map. However, the JSON response from a Spring Boot Rest Controller only ...
abdlost's user avatar
  • 51
0 votes
2 answers
651 views

`2024-01-14T20:25:05.873+05:30 INFO 12272 --- [ main] c.l.s.cruddemo.CruddemoApplication : Starting CruddemoApplication using Java 17.0.2 with PID 12272 (C:\Users\Anand\Desktop\dev-...
akcoder11's user avatar
0 votes
3 answers
3k views

I am encountering a problem in my Spring Boot JPA application related to relationships between the Owner and Car entities. The issue arises when attempting to associate a new Car with an existing ...
Cyclone's user avatar
  • 25
2 votes
3 answers
1k views

I have this basic delete request: @DeleteMapping("/{id}") public ResponseEntity<String> deleteSubscription(@PathVariable Long id) { subscriptionService.deleteSubscription(id); ...
madalin1Q's user avatar
1 vote
1 answer
783 views

I am running a unit test on a rest controller method addUser() which executes successfully without JSON path. Anytime I try to use jsonPath to perform strict data assertion to verify the content of ...
Solomon Otoo's user avatar
0 votes
0 answers
163 views

I implemented a custom converter to fail on unknown properties. I have a Front connected to FirstBackend and FirstBackend connected to SecondBackend. i m on a springboot v2.7.14 this is my converter : ...
Fethi's user avatar
  • 1
1 vote
1 answer
314 views

I created spring boot starter project with Rest application. When trying to run the application as Run on server it will redirect to web browser with URL till context-path but after adding endpoints ...
DhivyaViswanatha's user avatar
7 votes
4 answers
6k views

With WebClient I use this code to make web client work with a Spring Resource Server endpoint. Is it possible to make this code work with the new RestClient? @Bean UserClient userClient(...
Willy De Keyser's user avatar
0 votes
1 answer
4k views

Environment : Java 17 Service is on Spring Boot 3 OpenAPI dependencies : 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0', 'org.springdoc:springdoc-openapi-starter-common:2.1.0', '...
Anthony Vinay's user avatar
0 votes
0 answers
308 views

Please help if you have any idea why it's not working. I have been trying to test it with Postman for hours but no luck. I am trying to test my API with Postman but every time I try to send a post I ...
Zaso's user avatar
  • 11

1
2 3 4 5
33