Skip to content
Advertisement

Tag: spring-boot

Checkmarx Java fix for Log Forging -sanitizing user input

Can anyone suggest the proper sanitization/validation process required for the courseType variable in the following getCourses method. I am using that variable to write in a log file. I’ve tried HtmlUtils.HtmlEscape() but didn’t get expected results. Thanks! Answer it seems like the Checkmarx tool is correct in this case. A “Log Forging” vulnerability means that an attacker could engineer logs

Where does Spring Boot store its default logging settings

I’m creating a Java Spring Boot 2.X application. In my configuration (application.yml), I have added the following property: This seems to work out of the box. However, I’m curious where the underlying default log configurations reside. Using google I found out that Spring Boot uses logback, but I cannot see a logback-spring.xml file. Also this other question seems to mention

@KafkaListener is not consuming messages – issue with deserialization

Message Producer using Kafka bindings of Spring cloud streams This use below serialization spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$BytesSerde I am Trying to consume these messages in separate Consumer Application via Spring Kafka – KafkaListener Container factory configuration With this Configuration Consumer is not picking up the messages(Bytes). If I change Kafka listener to accept String then it gives me below exception : Caused

How to connect to DynamoDB on AWS using a Spring Boot application running on local system?

I’m working on Spring Boot microservice REST based application and backedn database is currently local Dynamodb database. I can make REST calls using Postman to my application running locally and can perform CRUD operation with the local dynamodb database. Now I want to make changes in the configuration so that whenever I make similar CRUD operations on my application running

java.lang.IllegalArgumentException when publishing a message with RabbitTemplate

I try to publish a message on a Queue with RabbitTemplate (using Spring Boot) and I got this message. I already tried to search for a solution. Maybe this part of code can help I appreciate any collaboration. Answer The problem is that your class SimpleMessage does not implement Serializable. RabbitTemplate.convertAndSend uses SimpleMessageConveter to convert your message into an amqp

Thymeleaf TemplateEngine unable to process templates on remote server

I am attempting to send emails using Thymeleaf from a SpringBoot application. Templates are processed locally using the following method: MailType is an Enum with the names of each template stored, for example NEWUSER. Mail templates are stored in src/main/resources/templates/mail/ This sends an email as intended when running locally, but when running on the server, I receive the following error

SpringBoot no main manifest attribute (maven)

When running my jar file: java -jar target/places-1.0-SNAPSHOT.jar I’m getting the next error : no main manifest attribute, in target/places-1.0-SNAPSHOT.jar The pom.xml contains the spring-boot-maven-plugin: I also tried to create a MANIFEST.MF file and specifying the class, but it didnt help. In addition, I also tried: Main class: Any idea what else can I try? Answer Try adding repackage goal

Advertisement