全局配置
file-close project 出现下面界面
点击settings进行配置
maven配置(很重要)
自动导包
去掉大小写匹配
字体大小
字符编码(很重要)
连接服务器时命令行编码(很坑)
一些常用插件
idea试用插件默认是下载不了的
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() + ")";
}
}