Annotated a class with @Configuration and @Controller. Need help in refactoring

前端 未结 6 610
一整个雨季
一整个雨季 2021-01-17 15:49

Below is my class in which i had to use both @Configuration and @Controller as there should be only one instance of Thymeleaf in the e

6条回答
  •  离开以前
    2021-01-17 16:09

    These two annotations are for different things, thus it's better to not use them on the same class. Cause it's against Separation of Concerns principal.

提交回复
热议问题