Closed charming-cc closed 10 months ago
文档写的这种方式无法使用,必须指定json文件名字,而不是通用的所有文件
You should use -g
option.
java -jar moco-runner-<version>-standalone.jar http -p 12306 -g settings.json
还是一样的,当我的配置文件中指定了文件名,就不会出现这错误
I figure out what's wrong: you put global setting and configuration files in same directory. Moco loads global setting file as configuration file.
The simple solution is to put configuration file in separated directory, e.g foo:
[
{
"include": "foo/*.json"
}
]
The problem has been solved,thanks
10 10月 2023 10:52:30 [main] INFO Unrecognized field: Unrecognized field "include" (class com.github.dreamhead.moco.parser.model.SessionSetting), not marked as ignorable (8 known properties: "response", "redirectTo", "mount", "proxy", "request", "websocket", "on", "resource"]) at [Source: (String)"[ {"include": "*.json"} ]"; line: 2, column: 18] (through reference chain: java.util.ArrayList[0]->com.github.dreamhead.moco.parser.model.SessionSetting["include"]) 10 10月 2023 10:52:30 [main] ERROR Unrecognized field [ include ], please check!