Windows版Spring Tool Suite 4中的Lombok安装 [英] Lombok installation in Spring Tool Suite 4 for Windows
问题描述
要在Windows 10 OS的STS 4上的一个春季启动项目中安装Lombok,请执行以下步骤:
To install Lombok on one of my spring boot project on STS 4 in Windows 10 OS, I did the following steps:
-
将lombok gradle依赖项添加到build.gradle:
Added the lombok gradle dependency to build.gradle:
编译'org.projectlombok:lombok'
compile 'org.projectlombok:lombok'
然后安装从构建上述依赖项中检索到的jar,得到一个lombok-1.16.16.jar.
Then to install the jar retrieved from building the above dependancy got a lombok-1.16.16.jar.
要编译jar,请右键单击jar->以Java应用程序运行.
To compile the jar did a right click on the jar -> Run as Java application.
Lombok安装程序出现,但无法从驱动器中检测到IDE.因此,手动尝试搜索STS4的.exe文件(我找不到)
Lombok Installer appeared, but couldn't detect the IDE from the drives. So manually tried searching for the .exe file of STS4 (which I couldn't find)
请帮助我找到STS的.exe文件,以完成安装
So kindly help me find the .exe file of STS, so as to complete the installation
推荐答案
默认情况下,Spring Tool Suite 4的名称为 SpringToolSuite4 ,它是可执行文件.在Lombok安装程序中未检测到此文件.在搜索了很长一段时间后,我只能看到关于如何安装Mac或Linux的结果.最后,只好稍微试验一下.以下是解决方案:
The Spring Tool Suite 4 by default has a name as SpringToolSuite4 which is the executable file. This file doesn't get detected in the Lombok installer. After googling it for quite a long time, all I could see were results of how to install the same of Mac or Linux. Finally, had to experiment a little. Following is the solution:
- 将 SpringToolSuite4 (Application(.exe))文件和(配置设置(.ini))重命名为 sts ,现在可以在Lombok安装程序中检测到了./li>
- 完成安装并重新启动STS,然后重新构建并清理项目,一切正常.
- Rename the SpringToolSuite4 (Application(.exe)) file and (Configuration settings (.ini)) to sts and now it is detectable in the Lombok installer.
- Complete the installation and restart STS and rebuild-clean your project and it works just fine.
这篇关于Windows版Spring Tool Suite 4中的Lombok安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!