Is Spring annotation @Controller same as @Service?

后端 未结 9 1887
夕颜
夕颜 2020-12-12 10:40

Is Spring annotation @Controller same as @Service?

I have idea about @Controller which can be used for URL mappin

9条回答
  •  被撕碎了的回忆
    2020-12-12 11:24

    No you can't they are different. When the app was deployed your controller mappings would be borked for example.

    Why do you want to anyway, a controller is not a service, and vice versa.

提交回复
热议问题