idea2020版配置记录

全局配置

file-close project 出现下面界面

 点击settings进行配置

maven配置(很重要)

 自动导包

 去掉大小写匹配

 字体大小

 字符编码(很重要)

 连接服务器时命令行编码(很坑)

 一些常用插件

 idea试用插件默认是下载不了的

https://plugins.zhile.io

 

 lombok使用 class是编译生成的

@Slf4j//日志注解
@NoArgsConstructor//无参构造
@AllArgsConstructor//全参构造
@Setter//set方法
@Getter//get方法
@Accessors(chain = true)//类的链式编程
@EqualsAndHashCode//equals和hashcode方法
@ToString//tostring方法
public class BaseEntity implements Serializable {
    private static final long serialVersionUID = 4072410652675947798L;
    private Date createTime;
    private Date updateTime;
}

 生成的class

package com.shihf.boot.entity;

import java.io.Serializable;
import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BaseEntity implements Serializable {
    private static final Logger log = LoggerFactory.getLogger(BaseEntity.class);
    private static final long serialVersionUID = 4072410652675947798L;
    private Date createTime;
    private Date updateTime;

    public BaseEntity() {
    }

    public BaseEntity(final Date createTime, final Date updateTime) {
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public BaseEntity setCreateTime(final Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public BaseEntity setUpdateTime(final Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof BaseEntity)) {
            return false;
        } else {
            BaseEntity other = (BaseEntity)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$createTime = this.getCreateTime();
                Object other$createTime = other.getCreateTime();
                if (this$createTime == null) {
                    if (other$createTime != null) {
                        return false;
                    }
                } else if (!this$createTime.equals(other$createTime)) {
                    return false;
                }

                Object this$updateTime = this.getUpdateTime();
                Object other$updateTime = other.getUpdateTime();
                if (this$updateTime == null) {
                    if (other$updateTime != null) {
                        return false;
                    }
                } else if (!this$updateTime.equals(other$updateTime)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof BaseEntity;
    }

    public int hashCode() {
        int PRIME = true;
        int result = 1;
        Object $createTime = this.getCreateTime();
        int result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
        Object $updateTime = this.getUpdateTime();
        result = result * 59 + ($updateTime == null ? 43 : $updateTime.hashCode());
        return result;
    }

    public String toString() {
        return "BaseEntity(createTime=" + this.getCreateTime() + ", updateTime=" + this.getUpdateTime() + ")";
    }
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值