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
Tag: spring-boot
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
Spring boot read and new mail Listener on spring-boot-starter-mail
I want to demonstrate the email application using the spring boot MVC in that web application I follow this tutorial I can easily send the emails using spring boot. Here my question is how can I read the emails using spring boot..? how can I listen for new emails and how to update the inbox on the view..? please suggest
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
How to serve files/PDF files the reactive way in spring
I have the following endpoint code to serve PDF files. How can I convert above into a reactive type Flux/Mono and DataBuffer. I have check DataBufferUtils but It doesn’t seem to offer what I needed. I didn’t find any example either. Answer The easiest way to achieve that would be with a Resource. Note that DataBufferUtils has some useful methods
Spring Security: Simple Encryption / decryption not working: InvalidKeyException
I’m trying to write a very simple program to encrypt and decrypt a string: But for some reason I never get an encrypted value. When I call enryptor.encrypt() it never reaches that point. I’m getting the following exception: What am I doing wrong? Answer Ok, after hours of searching I finally found the solution: Appearently I didn’t have the correct
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
How to configure delay time in Spring-retry (Spring Boot)
Is it possible to configure the @Retryable ? This methods (getCurrentRate) will be invoked 3 times. At first is 5 min, after that 10 min, lastly 15 min. How can I configure that ? Example Answer You can achieve that with this configuration: Invocations: After 5m ~ Delay = 300000 After 10m ~ Delay = 300000 * 2 = 600000