Category "spring"

Springfox swagger-ui.html unable to infer base URL - Caused by missing cookies

We have our Spring Boot services behind an API Gateway. With an earlier version of Springfox - 2.1.2 we had no issues in loading the swagger-ui.html page. This

BeanCurrentlyInCreationException when @Autowired and @Bean are present in same class

@Configuration public class Test1 { @Autowired private Test3 test3; } @Configuration public class Test2 { @Autowired private Test3 test3;

Spring-Boot-Admin application not starting because of error creating bean with name adminHandlerMapping

I am following this blog to try out a Spring-Boot-Admin application. And when I run the app it fails with the below error: Application run failed org.springfra

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.

Load Spring Boot Classes in ClassLoader

I need to read a Spring Boot jar and load all the clases on a ClassLoader. My problem,in spring boot classes are on "/BOOT-INF/classes" directory and not on t

Spring using windows user instead of given username 'root' to hit the mysql

Getting the error "Access denied for user 'DEll'@'localhost' (using password: YES)" In the spring xml file I have given the user as 'root' not dell. I ha

Spring boot: JSP not found (404)

I'm trying to create a new project with spring boot. But I'm getting Error described below. I have added my code. Error HTTP ERROR 404 page not found He

Bean instantiation via factory method failed; exception org.springframework.beans.BeanInstantiationException

I have the following Spring configuration for Kafka: import org.apache.kafka.clients.producer.ProducerConfig; import org.springframework.boot.context.properties

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata

How to fix this error? Here is it: Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata A

Get StateContext in @OnTransition annotated method

In the Spring Statemachine reference doc is this sample code: @WithStateMachine static class Bean1 { @OnTransition(source = "S1", target = "S2") publi

JUnit testing got initializationError with java.lang.Exception: No tests found matching

When running JUnit testing , it gave an initializationError: No tests found matching. Like this: prodapi-main-junit initializationError(org.junit.runner.manip

Spring Boot can't autowire @ConfigurationProperties

Here is my FileStorageProperties class: @Data @ConfigurationProperties(prefix = "file") public class FileStorageProperties { private String uploadDir

How to trigger commit programmaticaly on Spring Webflow 2 with Flow Managed Persistence Context

i have upgraded our application to SWF 2 and have implemented FMPC pattern. majority of our existing flow definitions doesn't have end-state, now using FMPC as

JOOQ - equivalent of hibernate interceptor for populating history fields?

Environment: Spring application, using JOOQ 3.7, generating the JOOQ mapping code automatically from the schema, using Postgres as my database. I've been porti

How to send jsonfile in api Request

I am facing an issue while sending the json file in request for RestController, Please check the details below I have a json file , let say test.json { "Pol

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