Skip to content
Advertisement

Tag: spring

SonarQube complains: Either log or rethrow this exception

I am running SonarQube 5 for code quality check after integrating the code with Maven. Sonar is complaining that I should: Either log or rethrow this exception. in following piece of code: What am I missing here? Answer First of all, is this behaviour correct? Seems a bit weird that you are trying to call convertStringtoDate on the exception message

Read properties by dynamic keys in spring boot

I wanted to know if there is any way in Spring Boot to read property values from properties file by using Dynamic Keys. I know properties can be put in application.properties and can be read using @Value(“propertyKey”) But my keys are going to be dynamic. I know about @PropertySource to read property values and I can construct my keys dynamically.

Can’t import org.springframework.context.ApplicationContext?

I just started learning Spring and I have problem importing Classes from Spring, please help! I tried almost everything what I found as a solutions, but it was a failure… Error: The import org.springframework.context.ApplicationContext cannot be resolved. Here’s my code or this is my pom.xml Answer ApplicationContext resides in that package. In your IDE if you control click on the

Cannot deserialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload

I am using eclipse marse jee, spring 4, redis 3. I downloaded a spring example from here. This example has 4 applications: admin – gateway – resource – ui. I have ran all of these program. I tested http://localhost:8080/ui/ and log in with username:admin, password:admin. I got this error in ui application. Can anyone help me? Answer Seems like SpringSecurityContextImpl

Advertisement