---
title: "#responsebodyadvice articles | Hashnode"
description: "Explore 1 articles tagged #responsebodyadvice on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/responsebodyadvice"
---

Tag

# #responsebodyadvice

1 posts · 0 followers

[Li Qi](https://hashnode.com/@CharlesLi) · [Jul 1, 2023](https://hashnode.com/posts/handle-springboot-responsebodyadvice-error-xxx-cannot-be-cast-to-java-lang-string-e64fad76d56e/649fc4c840dce52282133df5)

### [Handle SpringBoot ResponseBodyAdvice Error: xxx cannot be cast to java.lang.String](https://backend-with-java.hashnode.dev/handle-springboot-responsebodyadvice-error-xxx-cannot-be-cast-to-java-lang-string-e64fad76d56e?utm_source=hashnode&utm_medium=feed)

I encountered an error when trying to use the ResponseBodyAdvice interface to customize the response after executing the controller method with @ResponseBody annotation. The issue occurred when a controller method was returning a String, resulting in...

4 min read · [backend-with-java.hashnode.dev](https://backend-with-java.hashnode.dev/handle-springboot-responsebodyadvice-error-xxx-cannot-be-cast-to-java-lang-string-e64fad76d56e?utm_source=hashnode&utm_medium=feed)
