Category "spring"

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

Spring injection not working for FF4J web console

I am try to get the FF4j (ff4j.org) web console to work. According to the documentation on the website, I use the following configuration: <servlet>

Page looks different on localhost than in Intellij preview

In my Spring app I have implemented form on my page and I don't know why it looks different when I run it on localhost from when i clicked in the Intellij chrom

How to split catalina.out for tomcat?

I have log4j2.xml properties: <?xml version="1.0" encoding="UTF-8"?> <Configuration> <Appenders> <Console name="Console" target

Spring scheduling task - run only once

Is it possible to schedule Spring service method only once at exactly specified time? For example, current time is 2pm but when I hit the action button I want t