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

用BootStrap setting文件的方式启动,如果json文件改错一次后,服务将不可用,一定要重启 #304

Open
jingzhongwen opened this issue Sep 28, 2021 · 2 comments

Comments

@jingzhongwen
Copy link

1、我在应用代码中直接使用了BootStrap来启动服务,如下:
bootstrap.run(new String[]{serverType, "-p", port, "-g", filePath});
2、服务正常启动,然后估计改错JSON文件报如下错:
zaip-csbc-operation-service|WARN |2021-09-28 10:30:08,434|pool-1-thread-1|c.g.d.m.r.watcher.WatcherFactory|WatcherFactory.java:42|########com.fasterxml.jackson.databind.JsonMappingException: Unexpected character ('C' (code 67)): was expecting double-quote to start field name at [Source: (String)"[ { **CC**"request": {
3、把JSON文件改回来后,依然报错,无法启动
########Fail to load configuration in pbs.getUserInfoByIdNo.json.

@dreamhead
Copy link
Owner

Try to build your own Moco to check if it is fixed.

./gradlew proguard

@maodou38
Copy link

Recent,i use standalone mock server as a docker service and i find that the configuration change auto restart is fail.So i read the code about it,i find the auto restart service is based on java7's watchservice.�And in docker environment,it won't trigger any file change events.
�So can we use the basic way to monitor the file change such as use a schedule file scanner to do this.
�Watchservice is out-of-date in cloud 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

No branches or pull requests

3 participants