Category "spring"

Facing NoSuchMethodError and NoClassDefFoundError after Spring boot upgrade from 2.4.x to 2.5.x

Error logged while running gradle clean build: java.lang.Exception: Unexpected exception, expected<org.springframework.web.client.HttpClientErrorException>

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

What is the purpose of AuthenticationEntryPoint in Spring Web Security?

What is the purpose of AuthenticationEntryPoint in Spring Web Security? The documentation does not provide much details. When should this be used, and does it

No implementation was created for Mapper due to having a problem in the erroneous element

I'm trying to use Mapstruct to map my classes in a spring boot project. My dependencies : <?xml version="1.0" encoding="UTF-8"?> <project xmlns="ht

RestTemplate get body with ResourceAccessException

I'm sending API and receiving status code 400 with body I need to parse When working with RestTemplate I failed to parse response: try { ResponseEntity<

What is the character encoding Postman use to write multipart file data into request

I am writing a Java application to send multipart request with attached files to an API that help me send an email with the attachments to the specified email.

Intellij Spring Initializr not available

I'm using Intellij IDE to code spring Boot. Spring Initializr was not available for me in the new project option as in. http://blog.jetbrains.com/idea/2015/03

Adding .crt to Spring Boot to enable SSL

I have never done this before, and most of the tutorials do not mention how to deal with .crt files. I bought an SSL certificate from GoDaddy, and selected To

how can i make BCryptPasswordEncoder() work in spring because in my application can't find that classes

how can i make BCryptPasswordEncoder() work in spring because in my application can't find that class about that and the message is not matching for dependenci

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

How to set spring dispatcherServlet path?

I use application.properties file to set DispatcherServlet path: server.servlet.path=/api/ When I go to url /api/, I get this exception: Caused by: org.spri

Access-Control-Allow-Origin multiple values with Spring Boot and Vue.JS

I have this class for CORS on my API: import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annota

Null applicationContext from Quartz Job

I have a QuartzJobBean and I want to access my Spring Application Context from my Quartz job. I was following the directions located on the following blog. Howe

Gradle build failed: Main class name has not been configured and it could not be resolved

I am building a RESTful web service with Spring by following this guide. I am using grable to build the app but my build is failing. I used the "build gradle"

Can not resolve symbol "security" in spring boot application

I'm trying to learn Java Spring and doing exactly like here: https://spring.io/guides/gs/securing-web/ But my IDE says "cannot resolve 'security' symbol" while

Run multiple spring boot jars in one jvm

My project contains several services, each one is annotated with @SpringBootApplication and can be run on a random port via "gradle bootRun". Is it possible to

Is there any way to implement pagination in spring webflux and spring data reactive

I'm trying to understand reactive part of spring 5. I have created simple rest endpoint for finding all entities using spring web-flux and spring data reactive

r2dbc-pool connection not released after cancel

I have a strange behaviour with R2DBC Pool: We happen to create a large number of threads and send them to the R2DBC pool to acquire a DB connection. When all o

How to get JSON metadata of a class in Spring Boot

I'm trying to get metadata in JSON format of a class in Spring Boot, but I don't really know how to start. I have created my class, that is a random one, just t