| | |
| | | * LandApplication |
| | | * @author |
| | | */ |
| | | @SpringBootApplication |
| | | @SpringBootApplication(scanBasePackages={"com.lf.server.controller", "com.lf.server.service"}) |
| | | @EnableSwagger2 |
| | | public class LfApplication { |
| | | public static void main(String[] args) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.config; |
| | | |
| | | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; |
| | | |
| | | /** |
| | | * WebMVCConfig |
| | | * @author www |
| | | */ |
| | | public class WebMVCConfig extends WebMvcConfigurerAdapter { |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) { |
| | | registry.addResourceHandler("swagger-ui.html") |
| | | .addResourceLocations("classpath:/META-INF/resources/"); |
| | | registry.addResourceHandler("/webjars/**") |
| | | .addResourceLocations("classpath:/META-INF/resources/webjars/"); |
| | | } |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°", notes = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "tab", value = "表å", dataType = "String", paramType = "query", required = false, example = "sys_dict") |
| | | @ApiImplicitParam(name = "tab", value = "表å", dataType = "String", paramType = "query", required = false, example = "sys_dict") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public Integer selectCount(String tab) { |
| | |
| | | @ApiOperation(value = "å页æ¥è¯¢", notes = "å页æ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "tab", value = "表å", dataType = "String", paramType = "query", required = false, example = "sys_dict"), |
| | | @ApiImplicitParam(name = "pageSize", value = "æ¯é¡µæ¡æ°", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "å页索å¼ï¼ä»0å¼å§ï¼", dataType = "Integer", paramType = "query", example = "0") |
| | | @ApiImplicitParam(name = "pageSize", value = "æ¯é¡µæ¡æ°", dataType = "Integer", paramType = "query", required = false, example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "å页索å¼ï¼ä»0å¼å§ï¼", dataType = "Integer", paramType = "query", required = false, example = "0") |
| | | }) |
| | | @GetMapping(value = "/selectByPage") |
| | | public List<DictEntity> selectByPage(String tab, Integer pageSize, Integer pageIndex) { |