Questions tagged [spring-boot-2]

111 questions
0
votes
1 answer

Where/when does Spring utilize the Jackson2ObjectMapperBuilderCustomizer bean defined in a project's configuration?

My main question is: Where/when does Spring utilize (inject) the Jackson2ObjectMapperBuilderCustomizer bean defined in a project's @Configuration class -- can you please direct me to the line of code? The directions here make it seem like all I need…
Tung
  • 5,334
  • 1
  • 34
  • 41
0
votes
0 answers

Dynamically set 'basePackages' in java annotation

I have following code to enable the JPA repository scan, but I have many packages in my project, is it able to set basePackages in a property file? as I don't want to change this class EntityManagerConfig in this class. config…
meadlai
  • 895
  • 1
  • 9
  • 22
0
votes
1 answer

Atlassian Swagger Request Validator - Spring MVC Issue

I am using atlassian swagger request validator in my springboot application. I tried to configure all the beans as explained in the [official documentation][1] [1]:…
0
votes
1 answer

in Spring actuator: does HealthEndPoint.health() give the same result as calling /health endpoint?

I have a Spring boot (2.1.10.RELEASE) application and I have activated actuator to monitor the health of the application. My question as in the title already explained: Is calling the method health of the HealthEndPoint will give the same result as…
mnish
  • 3,877
  • 12
  • 36
  • 54
0
votes
1 answer

Spring boot 2.2 and setting HTTPS. Why two password as needed

All is into the question. I'm using spring boot 2.2 and I follow the documentation to set HTTPS (see the doc chapter here). In this example there is two parameter to define the key password. But in fact the password of my key need to do the same in…
BeRoots
  • 81
  • 12
0
votes
2 answers

spring CRUD DELETE action that return viewmodel or empty body

I want to write a DELETE action that return a no content body if no id error exist. If id not exist I want to redirect to the coresponding GET view. Controller code: @RequestMapping(value = "/todo/delete/{id}", method = RequestMethod.GET) public…
BeRoots
  • 81
  • 12
0
votes
2 answers

Form validation return white label error page

I tried to do a form validation using spring boot 2.2 and thymeleaf like the documentation example (https://spring.io/guides/gs/validating-form-input/) but I have a white label error page when wrong value are submitted when I should have a binding…
BeRoots
  • 81
  • 12
0
votes
3 answers

WebServiceTemplate performance issue with spring boot

I am consuming soap web services using WebServiceTemplate its working fine with good performance in spring3+ . spring :- 3.2.4.RELEASE spring-ws-core :- 2.1.4.RELEASE spring-ws-support :- 2.1.4.RELEASE spring-ws-security :-2.1.4.RELEASE Class for…
Sandeep Bhardwaj
  • 1,310
  • 1
  • 18
  • 24
0
votes
1 answer

Controller action with different URI doesn't work

I have a problem with href of link tag used in my view model like . This work nice on a controller action like example.test/todos but doesn't work when I try with a same action that just have a…
BeRoots
  • 81
  • 12
0
votes
0 answers

how to make springboot support h2c in tomcat9?

I try for this,a new connector was made to try to support h2c,whent i try to use the curl send http2 request,An error occurred on the server; environment: springboot 2.1.4 tomcat 9 jdk 1.8 @Bean public ServletWebServerFactory servletContainer() { …
0
votes
1 answer

How to solve CORS problem in SpringBoot2.X

I already configured the CORSConfiguration but it didn't work when I request some resources. It reported "......has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header…
Hunter_JW
  • 3
  • 2
0
votes
0 answers

Spring Boot 2 NamedNativeQuery no property found

I recently upgraded Spring Boot from 1.5.2 Release to Spring Boot 2.1.3 Release. And after that my application does not run because of Caused by: org.springframework.data.mapping.PropertyReferenceException: No property getPayments found for type…
0
votes
1 answer

Calling a Spring Boot 2 REST service with multipart/form-data with Postman results in a EOFException

While working on a personal project on Spring Boot, I have to develop a web service that accepts a file and some metadata, and I have decided to test with a Postman client. Versions I am using: Postman version: Postman for Mac Version 7.8.0 OS X…
CodingMonkey
  • 143
  • 3
  • 14
0
votes
1 answer

Can a springboot 2 jpa integration test be written to be fully tested via a rest controller?

I would like to write an integration test that accepts restful requests and processes them via JPA Create a record in the h2 database Validate that record can be retrieved via the restful service (from h2 database) How can I integration test an…
0
votes
0 answers

Zuul gateway error with Content-Type: multipart/form-data API

We moved our project to spring boot 2, and getting the CORS error in the API which sending the Content-Type: multipart/form-data. It was working fine with old version. For CORS we have disabled it, putting the below code. @Bean public…
Deepesh Uniyal
  • 923
  • 3
  • 20
  • 44