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

可以支持规则配置吗 #6

Open
RunawayFzzF opened this issue May 26, 2022 · 2 comments
Open

可以支持规则配置吗 #6

RunawayFzzF opened this issue May 26, 2022 · 2 comments

Comments

@RunawayFzzF
Copy link

现在使用注解配置对代码侵入较高,可以支持在测试类中对需要mock的对象进行值配置吗,可以减少代码侵入,提高生成对象属性值的准确性

@edisonX-sudo
Copy link

LGTM

@edisonX-sudo
Copy link

edisonX-sudo commented Feb 14, 2023

让用户能设置全局配置文件,可以参考es的dynamic_template的形式,按照名字的pattern来决定要用哪个工厂(可以用户自定义的)随机生成内容

//下方为es的dynamic_template的配置形式
{
  "mappings": {
    "dynamic_templates": [
      {
        "strings_as_ip": {
          "match": "ip*",//匹配这种命名
          "runtime": {
            "type": "ip"//就设置这种类型
          }
        }
      }
    ]
  }
}

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

No branches or pull requests

2 participants