The difference between the Controller and RestController

When using the framework of the Spring series, I believe almost everyone will meet @Controller and @RestController two notes, then the two notes in the end what is the difference?

1. Mark has @RestController class is used to return a Json object marked with @Controller category for the jump page, returns the name of the page.
2. @RestController Since the return object jason reason, used for separating the front and rear ends development situation, and since there @Controller page jump function, which is not used for separating items front and rear ends
Published 53 original articles · won praise 5 · Views 8296

Guess you like

Origin blog.csdn.net/weixin_44494373/article/details/102784306