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

检查服务名是否包含不允许的字符 & 使用字符串内插处理字符串拼接 #61

Closed
ymh199478 opened this issue Nov 24, 2018 · 0 comments
Labels

Comments

@ymh199478
Copy link
Contributor

ymh199478 commented Nov 24, 2018

  • 增加虚方法 GuardServiceName

    • 对方法Bind生效
    • 对方法Instance生效
  • 增加虚方法 GuardMethodName

    • 对方法BindMethod生效

验证生效后应该使用Alias来代替拥有非法字符的服务名,例如:

container.Instance("@num", 777);

被替换为:

container.Instance("num",777);
container.Alias("@num", "num");

因为一个服务可能对应多个特殊别名,如果以服务名作为别名的简化来写,从语意上来说显得不清晰。

@ymh199478 ymh199478 changed the title 检查服务名是否包含不允许的字符 检查服务名是否包含不允许的字符 & 使用字符串内插处理字符串拼接 Nov 24, 2018
ymh199478 pushed a commit that referenced this issue Nov 24, 2018
ymh199478 pushed a commit that referenced this issue Nov 24, 2018
@ymh199478 ymh199478 added the 1.3 label Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant