Skip to content
Advertisement

Tag: spring-boot

How to display auto-configuration report when running a Spring Boot application

Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled I am getting the above message when I try to run my Spring Boot application. Does anyone know how I can re-run the application with ‘debug’ enabled? I am running the application in Intellij (version 2016.1.2) My runner class looks like the following, In response to

How to send a multipart file to a service from another service

I have two endpoints api which are /uploadand /redirect /upload is where I directly upload the file. /redirect is where i receive the file and pass it to upload and get the JSON response from /upload.So below is my code: The endpoint /upload works pretty much fine.But when i call /redirect it throws an error of “exception”: “org.springframework.http.converter.HttpMessageNotWritableException”, “message”: “Could

execution default of spring-boot-maven-plugin repackage failed

I’ve got a simple project that is doing nothing for now and which is just a simple Spring Boot 2 application which supposed to use java 9. When I run mvnw clean package over hero-journey folder I get this error It does not provide any particular information about the cause except RuntimeException and that something happen (it seems) on class

Custom Http Status Code in Spring

I am using Spring Boot and I am using Exception Classes thoughout my business logic code. One might look like this: Well now there are Exception, where no predefined Http Status code is fitting, so I would like to use a status code like 460 or similar, which is still free, but the annotation ResponseStatus just accepts values from the

How to run integration test of a spring-boot based application through maven-failsafe-plugin?

I have a spring-boot based application, and the pom.xml file is configured as below. The main method located in class DemoApplication as below And my integration test class called DemoIT as following. Now here is my question, when I issue mvn clean verify command, the integration class DemoIT is supposed to be executed, and it does. However, my DemoApplication isn’t

How does Conditional annotation works in Spring Boot?

I understand that Spring Boot has lots of @Conditional annotations like, @ConditionalOnBean, @ConditionalOnClass, @ConditionalOnProperty, ConditionalOnWebApplication. But I do not know how this work? For Example: What I understood is, MyConfiguration will be loaded only if MyBean is available in my classpath. But how would it compile and run if MyBean class is not in my class path as the compiler

Advertisement