refactoring: move getCurrentRule to web/WebApplicationContext
allow customize json and rest result transformer