Skip to content

Tag: controller

SpringBoot. Thymeleaf. How to make table’s column clickable to send request to Controller?

I’ve created table with 8 columns: In fact each column (tag “td”) should serve as a button and after clicking send me to controller (@PostMapping or @GetMapping), where I will try to read th:value. How to make it? Instead of th:attr=”action=@{/}” I’ve tried to use th:href=”@{/}” – does not work. I’ve tried to insert between tags “td” the Form Button,

Why is Spring telling me the controller is an unknown entity upon saving a user?

After a few hours of running against the wall with this code, I’ve just about had it. This error is as indescriptive as can be. My User entity: TicketController controller with just the function that holds user info: User service and repository essentials: Long story short is that the User object should only need a mail address,

springboot override controller methods

I have to ask because none of the answers I found can help me to solve my problem. I have controller I want to override its methods because one specific customer has specific logics, with controller that can have exactly same methods signatures or overriding methods with RequestBody extending the original requests. I tried to define an interface for controllers

Testing a Spring ControllerMethod using Mockito which alters an entry in the db with NullPOinterException

Im currently Testing my Controller methods. In one Method I add a Reisepunkt(travelpoint) to a Reise(travel), which is already saved inside a database. Using the generated-request.http API I can use the method to make entrys into the db. Now i wanted to write a test method just so I can get the hang of it. I always get a NullPointerException

Controller Endpoint Naming Convention

I have a controller endpoint and I need help with the naming convention. Basically, the endpoint is supposed to find a customer by their Id/Email (which is sent in the url of the request). Thus I need to have two endpoints, one for users/{id} and one for users/{email}. The issue is, the above wouldn’t work as the routes are exactly