Category "spring-mvc"

Error executing DDL "drop table Player if exists" via JDBC Statement

Creating a spring mvc project with database using java configuration . The application gives error for tables operation like create, drop, alter operation for

Getting a 400 bad request response when submitting a form in Thymeleaf to my spring boot application

I am creating a Spring boot application with a thymeleaf front-end. I am trying to create an object of type "expense" (seen in the code snippet below) but, when

Application logout Cannot call sendRedirect() after the response has been committed

After login to the application and while trying to perform any activity the page keeps loading for some time and logged out of the application. I checked t

How can I test the Remember Me checkbox

I am currently setting up a service allowing user login on a web portal, for comfort I have added the "Remember Me" function using Spring Security by using a pe

Spring Data JPA / Hibernate "Unable to locate Attribute with the given name"

We have a problem with a Spring Web Application and Hibernate. It is written in Kotlin. We have an abstract Entity @Inheritance(strategy = InheritanceType.JOI

CSS and JS file not loading while deploying war file on apache tomcat

was using the spring-boot-starter-web-mvc for initial development.When I deploy the war file on the server it is not loading css and js files, but when I run th

Spring SecurityConfig not working

I have played with this for some time, but it does not seem to get wired to my project. Here is the file from the last time I edited it. I have permit all so I

G1GC Old Gen committed heap keeps growing, used is constant - leads to Eden starvation

The G1GC old generation committed heap goes up over time (about 5 to 6 days on production) but the old generation used heap does not. The Eden and survivor hea

No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor

When i try to navigate to an endpoint i get the following error Type definition error: [simple type, class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyIntercep

class java.lang.String cannot be cast to class org.springframework.security.core.userdetails.UserDetails

I'm making a reddit clone for practice and when I run it I'm getting the following exception: java.lang.ClassCastException: class java.lang.String cannot be cas

spring security : GrantedAuthority is not importing

i am using the spring security. I added the dependency in the pom.xml but the GrantedAuthority class is not importing in the code. pom.xml is <?xml vers

How to use LocalDateTime RequestParam in Spring? I get "Failed to convert String to LocalDateTime"

I use Spring Boot and included jackson-datatype-jsr310 with Maven: <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <

How do I register a HandlerInterceptor with constructor dependencies in Spring Boot

My use case is running custom code before a controller method by annotating methods. HandlerInterceptor seems the way to go but it seems impossible to inject d

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener Error

I am trying to implement Spring Security within my REST API. My project was working perfectly until I started to implement Spring. I believe the issue has somet

Spring boot, JSP file as view not loading when run in IntelliJ

I've created a simple Spring Boot Web Application in intelliJ. I've placed a simple .jsp file in the /src/main/resources/templates/ folder which contains some b

How to pass a javascript (js) Map to spring boot Controller?

I've a Java Script map having key value pairs which i Need to send to spring boot contoller :-- Example :-- var myMap = new Map(); myMap.set('1',

NoSuchMethodError java.lang.reflect.Method org.springframework.util.ClassUtils.getInterfaceMethodIfPossible(java.lang.reflect.Method, java.lang.Class)

I have a project that JSF works for which I wanted to integrate spring security through the following modifications: Add dependencies in pom.xml: (Updated) <

Spring MVC 5 ResultMatcher jsonPath null value

After upgrading my rest service from Spring Boot 1.5.10 to 2.0.0 I encountered my tests failing which passed before. Following Scenario: import org.mockito.in

Spring Boot Upgrade from 2.3.x -> 2.6.x Breaks mvc forward:

After upgrading From Spring Boot 2.3.x to 2.6.x Forwarding MVC REST Calls doesn't work. We have a controller for /health that returns forward:/actuator/health/.

Convert Int in Request Body to Long always

I wrote my backend in Java, and the endpoint is hit with a request body. The endpoint has a JSON body that looks like this {"id": 1234, "data": {...}} Now, I