Spring VSCode

使用 vscode 开发 Spring 项目

前言 毫无疑问,idea 是最好的 Java IDE 之一,它对 Spring 也有很好的支持,但是由于某高校的 JetBrains 授权被拉入黑名单,导致我无法继续使用正版授权,虽然可以通过给 JetBrains 写邮件,证明自己高校学生的身份后继续获取授权,但是实在是懒,而且我也不是很喜欢使用 IDE,于是就就打算使用 vscode 进行开发。 Visual Studio Code 作为一款优秀的代码编辑器,有非常多的插件,经过配置后完全可以胜任大部分 IDE 的功能,本文章简要介绍如何构建 spring 的开发环境。 配置 安装配置 Java 和 Maven .notice{padding:18px;line-height:24px;margin-bottom:24px;border-radius:4px;color:#444;background:#e7f2fa}.notice p:last-child{margin-bottom:0}.notice-title{margin:-18px -18px 12px;padding:4px 18px;border-radius:4px 4px 0 0;font-weight:700;color:#fff;background:#6ab0de}.notice.warning .notice-title{background:rgba(217,83,79,.9)}.notice.warning{background:#fae2e2}.notice.info .notice-title{background:#f0b37e}.notice.info{background:#fff2db}.notice.note .notice-title{background:#6ab0de}.notice.note{background:#e7f2fA}.notice.tip .notice-title{background:rgba(92,184,92,.8)}.notice.tip{background:#e6f9e6}.icon-notice{display:inline-flex;align-self:center;margin-right:8px}.icon-notice img,.icon-notice svg{height:1em;width:1em;fill:currentColor}.icon-notice img,.icon-notice.baseline svg{top:0.125em;position:relative} Tip 正常流程配置 Java 和 Maven,如果你已经配置过可以直接跳过 下载所需的 JDK 并解压。 在环境变量中配置 JAVA_HOME 在系统环境变量 PATH 中添加 JAVA_HOME/bin 下载 Maven 并解压 在环境变量中配置 MAVEN_HOME 在系统环境变量 PATH 中添加 MAVEN_HOME/bin 安装必要插件 Extension Pack For Java Gradle Extension Pack Spring Boot Extension Pack SonarLint Java Code Generators XML Dependency Analytics 在 settings....

十二月 28, 2021 · Aimer Neige
hugo-logo

Hello Hugo

前言 距离上一次写博客文章已经很长时间了,因为经常重装系统,而每次在电脑上安装和配置 hexo 的博客都是一件比较麻烦的事情,于是就一直咕了。但是最近我发现了 hugo 这一简洁好用的博客系统,可以让我远离配置安装都又慢又麻烦的 hexo,使用下来体验很棒,而我恰好又打算换一个博客主题,于是决定使用 hugo 来搭建我的新博客。本文简要介绍如何安装和使用 hugo。 安装 你可能需要 go 的开发环境 git 一个顺手的编辑器 你一定不需要 nodejs npm 安装 hugo 要安装 hugo 非常简单,以 fedora 系统为例,只需要执行如下指令: sudo dnf install hugo 创建站点文件夹 使用以下指令创建你的站点文件夹: hugo new site blog 切换到工作目录进行后续操作: cd blog 使用 git 进行版本控制: git init 安装主题 挑选好合适的主题后,将其直接 clone 在 ./themes 文件夹下即可。 git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 使用 --depth=1 参数会忽略历史 commit 记录。 当然,下载解压压缩包的方式也是可以的。 如果想要方便版本控制和更新,使用如下指令添加 submodule: git submodule add https://github....

八月 17, 2021 · Aimer Neige
editorconfig-logo

利用 EditorConfig 定义代码格式,统一代码风格

在多人协作的项目中,为了同一代码格式,可以使用 editorconfig 来定义,这样不仅可以帮助协作者快速了解当前项目要求的代码风格,也可以方便使用一些格式化工具保证代码风格按照预期格式化。 快速了解 What is EditorConfig? EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems....

一月 29, 2021 · Aimer Neige