java.lang.IllegalArgumentException: The class '[B' is not in the trusted packages: [java.util, java.lang, com.trisha.clients.collection, com.trisha.clients.collection.]. If you believe this class is safe to deserialize, please provide its name. If the serialization is only done by a trusted source, you can also enable trust all ().
Seems it does not like this. please help with right config file
.yml file
server:
port: 8787
spring.kafka.consumer.properties.spring.json.trusted.packages=*:
spring:
application:
name: message-processor
cloud:
function:
definition: messageProcessor
stream:
kafka:
streams:
binder:
brokers:
- localhost:9092
- localhost:36161
- localhost :40237
# auto-create-topics: true
# consumer-properties:
# default-binder: kafka
spring.cloud.stream:
bindings:
messageProcessor-in-0:
destination: first-topic
messageProcessor-out-0:
destination: first-topic.web-domains
kafka:
default:
consumer:
properties:
spring.json.trusted.packages: com.trisha.clients.collection
bindings:
messageProcessor-in-0:
consumer:
configuration:
key:
deserializer: org.apache.kafka.common.serialization.StringDeserializer
value:
deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
messageProcessor-out-0:
producer:
configuration:
key:
serializer: org.apache.kafka.common.serialization.StringSerializer
value:
serializer: org.springframework.kafka.support.serializer.JsonSerializer