Skip to content
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

一个更好的注解使用的建议 #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WilliamSESE
Copy link
Contributor

您好,我发现您的代码中的注释可能有一些小的改进。

服务层中的 Spring bean 应该使用 @service 而不是 @component 注解进行注解。
@service注解是@component在服务层的特化。 通过使用专门的注解,可以得到更优的效果。 首先,它们被视为 Spring bean,其次,您可以放置该层所需的特殊行为。

为了更好地理解和维护大型应用程序,@service 是更好的选择。

您好,我发现您的代码中的注释可能有一些小的改进。

服务层中的 Spring bean 应该使用 @service 而不是 @component 注解进行注解。
@service注解是@component在服务层的特化。 通过使用专门的注解,可以得到更优的效果。 首先,它们被视为 Spring bean,其次,您可以放置该层所需的特殊行为。

为了更好地理解和维护大型应用程序,@service 是更好的选择。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant