*/@RestControllerpublicclassArticleController{@AutowiredprivateSensitiveWordsMapper sensitiveWordsMapper;// 测试访问下面地址观察请求地址、界面返回数据及控制台( 普通参数 )// 无敏感词 http://localhost:8080/info?content=tom&see=1&age=18// 英文敏感词 http://localhost:8080/info?content=my%20content%20is...
strategy.setEntityLombokModel(true); // 配置 rest 风格的控制器(@RestController) strategy.setRestControllerStyle(true); // 配置驼峰转连字符 strategy.setControllerMappingHyphenStyle(true); // 配置表前缀,生成实体时去除表前缀 // 此处的表名为 test_mybatis_plus_user,模块名为 test_mybatis_plus,去除前...
AI代码解释 // 省略 import@RestController @RequestMapping("/common")@EnableSwagger2publicclassCommonController{@Autowired QuestionService questionService;@Autowired StudentService studentService;@GetMapping("/getAllQuestionByPage/{page}/{size}")publicMap<String,Object>getAllQuestionByPage(@PathVariable Integer...
@RestController @RequestMapping("/user") @RequiredArgsConstructor public class UserController { private final UserService userService; //分页查询 @RequestMapping("/page") public IPage<User> page(){ //1.设置分页信息 Page<User> page = new Page<>(2,3); //2.查询 Page<User> page1 = userServ...
1/**2* 定时工单表(Job)控制层3* 下个版本计划:添加eventBus 事件监听进行应用解耦,抽取定时任务相关的依赖,形成组件4*5*@authorafj6*/7@RestController8@RequestMapping("job")9@Api(tags = "定时工单相关接口")10@Slf4j11publicclassJobController {1213privatefinalJobService jobService;14privatefinalJobConfi...
@RestControllerpublicclassMyUserController { @AutowiredprivateMyUserService myUserService; @AutowiredprivateUserMapper userMapper; @GetMapping(value= "/findAll")publicList<MyUser>findAll() {//查询所有用户信息List<MyUser> users =myUserService.findAll();for(MyUser user : users) ...
packagecom.miracle.dm.controller;importcom.miracle.dm.pojo.BigData;importcom.miracle.dm.service.BigDataService;importorg.springframework.web.bind.annotation.GetMapping;importorg.springframework.web.bind.annotation.RequestMapping;importorg.springframework.web.bind.annotation.RestController;importjavax.annotation....
enableRestStyle() //开启生成 @RestController 控制器 //4.3、service 策略配置 .serviceBuilder() .formatServiceFileName("%sService") //格式化 service 接口文件名称,%s进行匹配表名,如 UserService .formatServiceImplFileName("%sServiceImpl") //格式化 service 实现类文件名称,%s进行匹配表名,如 UserService...
util.List; @Api("对学生表CRUD") @RestController @RequestMapping("/student") public class StudentController { @Autowired private StudentService studentService; @ApiOperation("添加学生") @PostMapping("/add") public String add(@RequestBody StudentVo student){ Student stu = new Student(); stu.set...
setRestControllerStyle(true); //是否生成RestController // 写于父类中的公共字段 strategy.setSuperEntityColumns("id"); //公共字段定义 strategy.setControllerMappingHyphenStyle(true); //驼峰转连字符 strategy.setTablePrefix(pc.getModuleName() + "_"); //表前缀 mpg.setStrategy(strategy); mpg.execute(...