Category "spring-mvc"

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

Content type multipart/mixed not supported / 415 UNSUPPORTED_MEDIA_TYPE (after Spring + Spring Boot upgrade)

I was previously using the following versions of Spring + Spring Boot: <springVersion>5.0.16.RELEASE</springVersion> <springBootVersion>2.0.5.

Missing artifact com.fasterxml.jackson.core:jackson-core:jar:1.9.11

I build a maven project and get an error on pom.xml Missing artifact in some dependencies. How can I resolve it?

How to fix 404 error, The origin server did not find a current representation for the target resource or is not willing to disclose that one exists

When I am trying to execute @RequestMapping("/showForm") I am facing an error. I think my code seems fine, I am simply returning new String with the name of my

WARNING: Exception encountered during context initialization - cancelling refresh attempt

Error is as shown below. The problem is, occurring as below, this XmlWebApplicationContext need not occur, since it's injecting the bean again. How to avoid it?

Unable to get different Content-Types in request mapping using Spring Framework

Here is my controller class: @Controller @RequestMapping("/actuator") public class HealthController { @RequestMapping(value = "/metrics", method = RequestM

org.apache.http.TruncatedChunkException

I am getting this issue when trying performance testing with jmeter. the application built on spring and ui with bootstrap with angularjs. this application work