java - 将 spacemacs 配置为 java (spring) ide
问题描述
我是使用 spacemacs 的初学者,但我正在努力学习。我是一名 java 开发人员,我已经将 spacemacs 配置为 java ide。我的配置层是这样的:
dotspacemacs-configuration-layers
'(javascript
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
;; `M-m f e R' (Emacs style) to install them.
;; ----------------------------------------------------------------
auto-completion
;; better-defaults
emacs-lisp
git
helm
lsp
markdown
(multiple-cursors :variables multiple-cursors-backend 'mc)
(plantuml :variables plantuml-jar-path "~/plantuml/plantuml.jar")
org
(shell :variables
shell-default-height 30
shell-default-position 'bottom)
;; spell-checking
;; syntax-checking
version-control
(java :variables java-backend 'lsp)
dap
treemacs)
我的用户配置是这样的
(defun dotspacemacs/user-config ()
"Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
(setq lombok-jar-path
(expand-file-name
"~/lombok/lombok.jar"
)
)
(setq lsp-java-vmargs `(
"-noverify"
"-Xmx1G"
"-XX:+UseG1GC"
"-XX:+UseStringDeduplication"
,(concat "-javaagent:" lombok-jar-path)
,(concat "-Xbootclasspath/a:" lombok-jar-path)
"--add-opens"
"java.base/java.util=ALL-UNNAMED"
"--add-opens"
"java.base/java.lang=ALL-UNNAMED"
"--add-modules=ALL-SYSTEM"
)
)
)
使用这个配置,我可以很好地编写我的代码,但是当我尝试使用 Mx dap-java-debug 使用 dap 来运行我的应用程序时,我收到了一个异常,一个 ClassNotFoundException 完全正确。我上传了一个关于这个的截图
也许我需要添加一个像 vscode 这样的 launch.json 配置,但我不知道。
有人可以在 spacemacs 中运行 Spring Boot 应用程序吗?
感谢您的回答。
上:避免回答我使用像 intellij 或 eclipse 这样的 ide,因为我正在学习 emacs。
解决方案
推荐阅读
- r - 使用 dplyr 分组的多个二元变量的频率/百分比
- r - 如何在 RStudio Markdown 中编译 pdf?
- solr - Solr 无法在 Broadleaf Commerce 上获得财产价值
- excel - VBA 嵌套 IF/ElseIF 帮助条件超链接创建
- spring - Spring Boot Webflux:RouterFunctions 添加查询参数
- c++ - 二进制搜索用任意字节数编码的整数列表
- ruby - 将 selenium docker 容器 IP 传递给 ruby cucumber 脚本
- javascript - 如何更改 Node JS 中的对象字段值?
- scala - Orbeon 表单 - 日期选择器更改为错误的日期
- css - 在 Kendo Grid 顶部显示 Div