---
title: "Discussion on \"Why @GetMapping doesn't work in Thymeleaf?\" | Hashnode"
description: "Discussion on \"Why @GetMapping doesn't work in Thymeleaf?\". @GetMapping with @RestController returns JSON, not HTML. Use @Controller for Thymeleaf"
url: "https://hashnode.com/posts/why-getmapping-doesnt-work-in-thymeleaf/66ab8360cad3fb22d0e7109a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why @GetMapping doesn't work in Thymeleaf?](https://aliencodes.hashnode.dev/why-getmapping-doesnt-work-in-thymeleaf?utm_source=hashnode&utm_medium=feed)

@GetMapping with @RestController returns JSON, not HTML. Use @Controller for Thymeleaf

Aug 1, 2024 · 1 min read · aliencodes.hashnode.dev  
Updated Sep 25, 2024  
Read the article

-   [#springboot](https://hashnode.com/tag/springboot)
-   [#springboot3](https://hashnode.com/tag/springboot3)
-   [#java](https://hashnode.com/tag/java)
-   [#thymeleaf](https://hashnode.com/tag/thymeleaf)

## Written by

[pushpak](https://hashnode.com/@alienCodes)

@alienCodes · Nagpur, Maharashtra

  
[View profile](https://hashnode.com/@alienCodes)

I am a glitch...fixing my own bugs...

I think I am a techie but I think that is true....

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
