Skip to content

Problem changing templates folder #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
callor opened this issue Mar 19, 2025 · 0 comments
Open

Problem changing templates folder #332

callor opened this issue Mar 19, 2025 · 0 comments

Comments

@callor
Copy link

callor commented Mar 19, 2025

I want to change the resources/templates folder to resources/views in a spring boot project.

However, if I change the templates folder to a different name (I use views), the Controller does not recognize the folder. When I run the project and execute the Request, the *.html file is loaded normally and displayed on the screen. However, it is inconvenient because a warning (or error) keeps appearing in the IntelliJ IDE. Please tell me how to solve it.

Image

The resources/application.yaml file is set as follows:

spring:
  application:
    name: myapp

  thymeleaf:
    prefix: classpath:/views/
    suffix: .html
    mode: HTML
    cache: false

The views folder of the project is as follows:

Image

@callor callor changed the title I want to change the resources/templates folder to resources/views in a spring boot project. Problem changing templates folder Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant