• EasyCode整合mybatis-plus的配置


    这篇文章不教你如何安装和使用EasyCode,只是贴出可以使用的配置。
    具体EasyCode的使用可以查看其它的文章。

    entity

    ##导入宏定义
    $!{define.vm}
    
    ##保存文件(宏定义)
    #save("/entity", ".java")
    
    ##包路径(宏定义)
    #setPackageSuffix("entity")
    
    ##自动导入包(全局变量)
    $!{autoImport.vm}
    
    import java.io.Serializable;
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import lombok.Builder;
    
    /**
     * @author: ZhangBlossom
     * @date: $!time.currTime()
     * @contact: QQ:4602197553
     * @contact: WX:qczjhczs0114
     * @blog: https://blog.csdn.net/Zhangsama1
     * @github: https://github.com/ZhangBlossom
     * @description: 
     */
    
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class $!{tableInfo.name}  {
    #foreach($column in $tableInfo.pkColumn)
        #if(${column.comment})//${column.comment}#end
    @TableId
        private $!{tool.getClsNameByFullName($column.type)} $!{column.name};
    #end
    
    #foreach($column in $tableInfo.otherColumn)
        #if(${column.comment})//${column.comment}#end
    
        private $!{tool.getClsNameByFullName($column.type)} $!{column.name};
    #end
    
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47

    mapper.java

    ##导入宏定义
    $!{define.vm}
    
    ##设置表后缀(宏定义)
    #setTableSuffix("Mapper")
    
    ##保存文件(宏定义)
    #save("/mapper", "Mapper.java")
    ##包路径(宏定义)
    #setPackageSuffix("mapper")
    
    import com.baomidou.mybatisplus.core.mapper.BaseMapper;
    import org.apache.ibatis.annotations.Mapper;
    import $!{tableInfo.savePackageName}.entity.$!{tableInfo.name};
    
    /**
     * @author: ZhangBlossom
     * @date: $!time.currTime()
     * @contact: QQ:4602197553
     * @contact: WX:qczjhczs0114
     * @blog: https://blog.csdn.net/Zhangsama1
     * @github: https://github.com/ZhangBlossom
     * @description: 
     */
    @Mapper
    public interface $!{tableName} extends BaseMapper<$!tableInfo.name> {
    
    }
    
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32

    mapper.xml

    ##引入mybatis支持
    $!mybatisSupport
    
    ##设置保存名称与保存位置
    $!callback.setFileName($tool.append($!{tableInfo.name}, "Mapper.xml"))
    $!callback.setSavePath($tool.append($modulePath, "/src/main/resources/mapper"))
    
    ##拿到主键
    #if(!$tableInfo.pkColumn.isEmpty())
        #set($pk = $tableInfo.pkColumn.get(0))
    #end
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
    <mapper namespace="$!{tableInfo.savePackageName}.mapper.$!{tableInfo.name}Mapper">
        <!-- 结果集 -->
        <resultMap type="$!{tableInfo.savePackageName}.entity.$!{tableInfo.name}" id="$!{tableInfo.name}Map">
    #foreach($column in $tableInfo.fullColumn)
            <result property="$!{column.name}" column="$!{column.obj.name}" jdbcType="$!{column.ext.jdbcType}"/>
    #end
        </resultMap>
        
        <!-- 基本字段 -->
        <sql id="Base_Column_List">
            #allSqlColumn()
        </sql>
        
    </mapper>
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31

    service

    
    import com.baomidou.mybatisplus.extension.service.IService;
    import $!{tableInfo.savePackageName}.entity.$!{tableInfo.name};
    import $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}RespDTO;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}CreateRequest;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}PageRequest;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}UpdateRequest;
    
    
    /**
     * @author: ZhangBlossom
     * @date: $!time.currTime()
     * @contact: QQ:4602197553
     * @contact: WX:qczjhczs0114
     * @blog: https://blog.csdn.net/Zhangsama1
     * @github: https://github.com/ZhangBlossom
     * @description: 
     */
    
    public interface $!{tableName} extends IService<$!tableInfo.name> {
        
        $!{tableInfo.name}RespDTO get$!{tableInfo.name}ById(Long $!{tableInfo.name}Id);
    
        PageResponse<$!{tableInfo.name}RespDTO> pageQuery$!{tableInfo.name}($!{tableInfo.name}PageRequest requestParam);
    
        $!{tableInfo.name}RespDTO update$!{tableInfo.name}($!{tableInfo.name}UpdateRequest updateRequest);
    
        Boolean delete$!{tableInfo.name}ById(Long $!{tableInfo.name}Id);
    
        Boolean batchDelete$!{tableInfo.name}(List<Long> ids);
    
        $!{tableInfo.name}RespDTO create$!{tableInfo.name}($!{tableInfo.name}CreateRequest createRequest);
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34

    serviceImpl

    ##导入宏定义
    $!{define.vm}
    
    ##设置表后缀(宏定义)
    #setTableSuffix("ServiceImpl")
    
    ##保存文件(宏定义)
    #save("/service/Impl", "ServiceImpl.java")
    
    ##包路径(宏定义)
    #setPackageSuffix("service.Impl")
    
    import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
    import org.springframework.stereotype.Service;
    import lombok.extern.slf4j.Slf4j;
    import $!{tableInfo.savePackageName}.entity.$!{tableInfo.name};
    import $!{tableInfo.savePackageName}.mapper.$!{tableInfo.name}Mapper;
    import $!{tableInfo.savePackageName}.service.$!{tableInfo.name}Service;
    import $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}RespDTO;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}CreateRequest;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}PageRequest;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}UpdateRequest;
    
    
    /**
     * @author: ZhangBlossom
     * @date: $!time.currTime()
     * @contact: QQ:4602197553
     * @contact: WX:qczjhczs0114
     * @blog: https://blog.csdn.net/Zhangsama1
     * @github: https://github.com/ZhangBlossom
     * @description: 
     */
    @Service
    @Slf4j
    @RequiredArgsConstructor
    public class $!{tableInfo.name}ServiceImpl extends ServiceImpl<$!{tableInfo.name}Mapper, $!{tableInfo.name}> implements $!{tableInfo.name}Service {
    
        private final $!{tableInfo.name}Mapper $!tool.firstLowerCase($!{tableInfo.name})Mapper;
    
    
        @Override
        public $!{tableInfo.name}RespDTO create$!{tableInfo.name}($!{tableInfo.name}CreateRequest createRequest) {
            $!{tableInfo.name} $!tool.firstLowerCase($!{tableInfo.name}) = $!{tableInfo.name}Convert.INSTANCE.convert(createRequest);
            if (Objects.isNull($!tool.firstLowerCase($!{tableInfo.name}))) {
                log.info("the $!tool.firstLowerCase($!{tableInfo.name}) is null...");
                return null;
            }
            $!tool.firstLowerCase($!{tableInfo.name})Mapper.insert($!tool.firstLowerCase($!{tableInfo.name}));
            $!{tableInfo.name}RespDTO respDTO = AlbumConvert.INSTANCE.convert($!tool.firstLowerCase($!{tableInfo.name}));
            return respDTO;
        }
    
        @Override
        public $!{tableInfo.name}RespDTO get$!{tableInfo.name}DetailById(Long $!tool.firstLowerCase($!{tableInfo.name})Id) {
            $!{tableInfo.name} $!tool.firstLowerCase($!{tableInfo.name}) = $!tool.firstLowerCase($!{tableInfo.name})Mapper.selectById($!tool.firstLowerCase($!{tableInfo.name})Id);
            if (Objects.isNull($!tool.firstLowerCase($!{tableInfo.name}))) {
                log.info("the $!tool.firstLowerCase($!{tableInfo.name}) is null...");
                return null;
            }
            $!{tableInfo.name}RespDTO respDTO = $!{tableInfo.name}Convert.INSTANCE.convert($!tool.firstLowerCase($!{tableInfo.name}));
            return respDTO;
        }
    
        @Override
        public PageResponse<$!{tableInfo.name}RespDTO> pageQuery$!{tableInfo.name}($!{tableInfo.name}PageRequest pageRequest) {
            LambdaQueryWrapper<$!{tableInfo.name}> lqw = new LambdaQueryWrapper<>();
            Page<$!{tableInfo.name}> page = new Page(pageRequest.getPageNo(), pageRequest.getPageSize());
            Page<$!{tableInfo.name}> $!tool.firstLowerCase($!{tableInfo.name})Page = $!tool.firstLowerCase($!{tableInfo.name})Mapper.selectPage(page, lqw);
            List<$!{tableInfo.name}RespDTO> respDTOList = null;
            if (CollectionUtil.isEmpty($!tool.firstLowerCase($!{tableInfo.name})Page.getRecords())) {
                respDTOList = $!{tableInfo.name}Convert.INSTANCE.convert($!tool.firstLowerCase($!{tableInfo.name})Page.getRecords());
            }
            return new PageResponse<>(pageRequest.getPageNo(), pageRequest.getPageSize(), respDTOList);
        }
    
        @Override
        public $!{tableInfo.name}RespDTO update$!{tableInfo.name}($!{tableInfo.name}UpdateRequest updateRequest) {
            $!{tableInfo.name} $!tool.firstLowerCase($!{tableInfo.name}) = $!tool.firstLowerCase($!{tableInfo.name})Mapper.selectById(updateRequest.getId());
            if (Objects.isNull($!tool.firstLowerCase($!{tableInfo.name}))) {
                log.error("the album is null");
                throw new EntityNotFoundException("can not find $!tool.firstLowerCase($!{tableInfo.name}) whick id is: " + updateRequest.getId()
                        , BaseErrorCode.ENTITY_NOT_FOUNT);
            }
            try {
                $!tool.firstLowerCase($!{tableInfo.name})Mapper.updateById($!tool.firstLowerCase($!{tableInfo.name}));
                $!{tableInfo.name} resp = $!tool.firstLowerCase($!{tableInfo.name})Mapper.selectById($!tool.firstLowerCase($!{tableInfo.name}).getId());
                $!{tableInfo.name}RespDTO respDTO = $!{tableInfo.name}Convert.INSTANCE.convert(resp);
                return respDTO;
            } catch (Exception e) {
                throw e;
            }
    
        }
    
        @Override
        public Boolean delete$!{tableInfo.name}ById(Long $!tool.firstLowerCase($!{tableInfo.name})Id) {
            return ($!tool.firstLowerCase($!{tableInfo.name})Mapper.deleteById($!tool.firstLowerCase($!{tableInfo.name})Id)) > 0;
        }
    
        @Override
        public Boolean batchDelete$!{tableInfo.name}(List<Long> ids) {
            if (CollectionUtil.isEmpty(ids)) {
                log.info("ids is null...");
                return true;
            }
            return $!tool.firstLowerCase($!{tableInfo.name})Mapper.deleteBatchIds(ids) > 0;
        }
    
    }
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113

    controller

    ##导入宏定义
    $!{define.vm}
    ##设置表后缀(宏定义)
    #setTableSuffix("Controller")
    ##保存文件(宏定义)
    #save("/controller", "Controller.java")
    ##包路径(宏定义)
    #setPackageSuffix("controller")
    ##定义服务名
    #set($serviceName = $!tool.append($!tool.firstLowerCase($!tableInfo.name), "Service"))
    ##定义实体对象名
    #set($entityName = $!tool.firstLowerCase($!tableInfo.name))
    
    
    import $!{tableInfo.savePackageName}.entity.$!tableInfo.name;
    import $!{tableInfo.savePackageName}.service.$!{tableInfo.name}Service;
    
    
    
    import org.springframework.web.bind.annotation.*;
    import java.util.List;
    
    import $!{tableInfo.savePackageName}.entity.$!tableInfo.name;
    import $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}RespDTO;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}CreateRequest;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}PageRequest;
    import $!{tableInfo.savePackageName}.req.$!{tableInfo.name}UpdateRequest;
    import $!{tableInfo.savePackageName}.service.$!{tableInfo.name}Service;
    
    
    import lombok.RequiredArgsConstructor;
    import org.springframework.validation.annotation.Validated;
    import org.springframework.web.bind.annotation.*;
    
    import javax.validation.Valid;
    import javax.validation.constraints.NotNull;
    import java.util.List;
    import java.util.concurrent.Executors;
    
    
    
    /**
     * @author: ZhangBlossom
     * @date: $!time.currTime()
     * @contact: QQ:4602197553
     * @contact: WX:qczjhczs0114
     * @blog: https://blog.csdn.net/Zhangsama1
     * @github: https://github.com/ZhangBlossom
     * @description: 
     */
    
    @VLog
    @RestController
    @RequestMapping("/v1/$!{entityName}")
    @RequiredArgsConstructor
    public class $!{tableName} {
      
    
        $!{tableInfo.name}Service $!{serviceName};   
      
       /**
         * 按照ID查询
         * @param $!{entityName}Id
         * @return
         */
        @GetMapping("")
        public Result<$!{tableInfo.name}RespDTO> get$!{tableInfo.name}ById(@Validated @RequestParam(name = "$!{entityName}Id") @NotNull(message = "$!{entityName}Id Can not be null") Long $!{entityName}Id) {
            $!{tableInfo.name}RespDTO result = $!{entityName}Service.get$!{tableInfo.name}ById($!{entityName}Id);
            return Result.ok(result);
        }
    
        /**
         * 带条件分页查询
         * @param requestParam
         * @return
         */
        @GetMapping("/page")
        public Result<PageResponse<$!{tableInfo.name}RespDTO>> pageQuery$!{tableInfo.name}(@Validated $!{tableInfo.name}PageRequest requestParam) {
            return Result.ok($!{entityName}Service.pageQuery$!{tableInfo.name}(requestParam));
        }
    
        /**
         * 基于ID修改
         * @param updateRequest
         * @return
         */
        @PutMapping("")
        public Result<$!{tableInfo.name}RespDTO> update$!{tableInfo.name}(@Validated @RequestBody $!{tableInfo.name}UpdateRequest updateRequest){
           return Result.ok($!{entityName}Service.update$!{tableInfo.name}(updateRequest));
        }
    
        /**
         * 基于ID修改
         * @param $!{entityName}Id
         * @return
         */
        @DeleteMapping("")
        public Result<Boolean> delete$!{tableInfo.name}ById(@RequestParam @Validated Long $!{entityName}Id){
            return Result.ok($!{entityName}Service.delete$!{tableInfo.name}ById($!{entityName}Id));
        }
    
        /**
         * 根据ID批量删除
         * @param ids
         * @return
         */
        @DeleteMapping("/batch")
        public Result<Boolean> batchDelete$!{tableInfo.name}(@RequestBody List<Long> ids){
            return Result.ok($!{entityName}Service.batchDelete$!{tableInfo.name}(ids));
        }
    
        /**
         * 创建
         * @param createRequest
         * @return
         */
        @PostMapping("")
        public Result<$!{tableInfo.name}RespDTO> create$!{tableInfo.name}(@RequestBody @Valid $!{tableInfo.name}CreateRequest createRequest){
            return Result.ok($!{entityName}Service.create$!{tableInfo.name}(createRequest));
    
        }
      
    }
    
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127

    RespDTO

    ##导入宏定义
    $!{define.vm}
    
    ##设置表后缀(宏定义)
    #setTableSuffix("RespDTO")
    ##保存文件(宏定义)
    #save("/dto", "RespDTO.java")
    ##包路径(宏定义)
    #setPackageSuffix("dto")
    ##自动导入包(全局变量)
    $!{autoImport.vm}
    
    import java.io.Serializable;
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import lombok.Builder;
    
    
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class $!{tableName}  {
    
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27

    CreateRequest

    ##导入宏定义
    $!{define.vm}
    
    ##设置表后缀(宏定义)
    #setTableSuffix("CreateRequest")
    ##保存文件(宏定义)
    #save("/req", "CreateRequest.java")
    ##包路径(宏定义)
    #setPackageSuffix("req")
    
    ##自动导入包(全局变量)
    $!{autoImport.vm}
    
    import java.io.Serializable;
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import lombok.Builder;
    
    
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class $!{tableName}  {
    
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28

    UpdateRequest

    ##导入宏定义
    $!{define.vm}
    
    ##设置表后缀(宏定义)
    #setTableSuffix("UpdateRequest")
    ##保存文件(宏定义)
    #save("/req", "UpdateRequest.java")
    ##包路径(宏定义)
    #setPackageSuffix("req")
    
    ##自动导入包(全局变量)
    $!{autoImport.vm}
    
    import java.io.Serializable;
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import lombok.Builder;
    
    
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class $!{tableName}  {
    
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28

    PageRequest

    ##导入宏定义
    $!{define.vm}
    
    ##设置表后缀(宏定义)
    #setTableSuffix("PageRequest")
    ##保存文件(宏定义)
    #save("/req", "PageRequest.java")
    ##包路径(宏定义)
    #setPackageSuffix("req")
    
    ##自动导入包(全局变量)
    $!{autoImport.vm}
    
    import java.io.Serializable;
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import lombok.Builder;
    
    
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class $!{tableName}  {
    
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28

    SpringCloud项目使用方法

    在SpringCloud项目下,我的不同模块存放不同的类。
    在这里插入图片描述
    比如common存放通用实体类,core存放mapper以及service,web则存放controller层代码。
    那么使用EasyCode生成代码的时候。方法如下:

    生成通用实体类

    在这里插入图片描述

    生成mapper以及service

    在这里插入图片描述

    生成Controller

    在这里插入图片描述

  • 相关阅读:
    Volatile:JVM 我警告你,我的人你别乱动!
    ElasticSearch 查询方法示例 java
    三、飞行和射击
    【Linux】多线程_8
    关于类和对象超级初级小白知识
    软件测试功能测试全套常见面试题【功能测试】面试总结4-2
    TS中Class类构造函数和this的使用
    五个好习惯,助你顺利成长
    十二、排序
    【数据聚类】基于蝙蝠算法实现数据聚类附matlab代码
  • 原文地址:https://blog.csdn.net/Zhangsama1/article/details/133171587