-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Description
NodeHandler nodeHandlers(String nodeName) {
Map<String, NodeHandler> map = new HashMap<String, NodeHandler>();
map.put("trim", new TrimHandler());
map.put("where", new WhereHandler());
map.put("set", new SetHandler());
map.put("foreach", new ForEachHandler());
map.put("if", new IfHandler());
map.put("choose", new ChooseHandler());
map.put("when", new IfHandler());
map.put("otherwise", new OtherwiseHandler());
map.put("bind", new BindHandler());
return map.get(nodeName);
}
These handlers are thread-safe, so they do not need to be created every time。
Using a global Map instead of local variables might be better?
MyBatis version
3.3.1
Database vendor and version
Test case or example project
Steps to reproduce
Expected result
Actual result
George5814
Metadata
Metadata
Assignees
Labels
No labels