| | |
| | | strategy.setLogicDeleteFieldName("deleted"); |
| | | // 自动填充配置 |
| | | TableFill gmtCreate = new TableFill("gmt_create", FieldFill.INSERT); |
| | | TableFill gmtModified = new TableFill("gmt_modified",FieldFill.INSERT_UPDATE); |
| | | TableFill gmtModified = new TableFill("gmt_modified", FieldFill.INSERT_UPDATE); |
| | | ArrayList<TableFill> tableFills = new ArrayList<>(); |
| | | tableFills.add(gmtCreate); |
| | | tableFills.add(gmtModified); |
| | |
| | | // 乐观锁 |
| | | strategy.setVersionFieldName("version"); |
| | | strategy.setRestControllerStyle(true); |
| | | strategy.setControllerMappingHyphenStyle(true); //localhost:8080/hello_id_2mpg.setStrategy(strategy); |
| | | strategy.setControllerMappingHyphenStyle(true); //localhost:8080/hello_id_2 |
| | | mpg.setStrategy(strategy); |
| | | mpg.execute(); //执行 |
| | | |
| | | } |
| | | } |