I am trying to implement axon framework with spring boot.
Here is the version of jars.
My Project Structure is:
I am getting the below exception while try to access the UserRegisteredEvent* from query application.
com.thoughtworks.xstream.security.ForbiddenClassException: com.tesla.user.core.events.UserRegisteredEvent
at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26) ~[xstream-1.4.18.jar:1.4.18]
Where I am going wrong?
Note:
I have tried downgrading my java version to 16 and spring boot to 2.4.* also .
I found the solution by adding XStream bean.
@Bean
public XStream xStream() {
XStream xStream = new XStream();
xStream.allowTypesByWildcard(new String[] { "com.example.**" });
return xStream;
}
Detail in this post.
Hope this help