本文基于mac环境,windows与linux略有不同
基础环境篇
安装java:
https://www.oracle.com/java/technologies/javase-downloads.html
安装jetbrains全家桶
https://www.jetbrains.com/zh-cn/
idea:java开发工具
Goland:go语言开发工具
DataGrip:数据库工具
安装homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
更换国内源:
# 替换brew.git:
$ cd "$(brew --repo)"
# 中国科大:
$ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 清华大学:
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
# 替换homebrew-core.git:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
# 中国科大:
$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# 清华大学:
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
# 替换homebrew-bottles:
# 中国科大:
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile
# 清华大学:
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile
# 应用生效:
$ brew update
替换命令行为zsh:
$ brew install zsh
$ chsh -s /bin/zsh
尽量节俭,主题用robbyrussell,同时支持一个命令高亮
ZSH_THEME="robbyrussell"
语法高亮:
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
$ echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
推荐工具篇
redis客户端:
https://www.redily.app
目前用起来最爽的redis客户端,还是免费的
termius:
https://www.termius.com
非常强大的ssh工具,免费版功能足以
Transmit:
https://www.panic.com/transmit/
FTP && SFTP连接工具,付费工具
Alfred4:
https://www.alfredapp.com
这个工具说是mac必备的不为过吧,极大提升效率
有道翻译的小工具:
链接:https://pan.baidu.com/s/1rI0w_H3N0dLb6mskYORUzw 密码:x85p
需要自己配置一下有道翻译的appkey和apptoken
Boom 3D:
http://boom3dapp.com
极大提高mac电脑的音效,apple store里可以下载
idea配置篇
功能性插件:
.ignore | Alibaba Java Coding Guidelines | Free Mybatis plugin | IntelliJ Lombok plugin | Maven Helper
美化类插件:
Atom Material Icons | Dark Purple Theme
还是这种极简风格,尽量少的工具,很多东西没意义,学起来还浪费时间。
idea配置
Editor -> File and Code templates -> File header
/**
* ${DESCRIPTION}
* since ${DATE}
* @author ${USER}
*/
另外也可以配置一些创建文件便捷模版例如:
Editor -> File and Code templates -> File -> + Mapper
<?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="">
</mapper>
Editor -> File and Code templates -> File -> + Mapper
<?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="">
</mapper>
Editor -> File and Code templates -> File -> + Service
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#set($INTERFACE = ${StringUtils.chop($NAME,4)})
#set($SERVICE = $INTERFACE.substring(0,1).toLowerCase() + $INTERFACE.substring(1))
import ${PACKAGE_NAME}.${INTERFACE};
import lombok.extern.slf4j.Slf4j;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
#parse("File Header.java")
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ${NAME} implements ${INTERFACE}{
}