将spacemacs配置为java(spring)ide

dgtucam1  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(369)

我刚开始使用SpaceMac,但我正在努力学习。我是一个java开发人员,我已经将spacemacs配置为javaide。我的配置层如下:

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"
                          )
        )
  )

通过这个配置,我可以很好地编写代码,但是当我尝试使用m-x dap java debug使用dap来运行我的应用程序时,我收到了一个异常,一个classnotfoundexception。我上传了一张截图

也许我需要添加一个类似于vscode的launch.json配置,但我不知道。
有人能在SpaceMac上运行spring boot应用程序吗?
谢谢你的回答。
向上:避免回答我使用intellij或eclipse之类的ide,因为我正在学习emacs。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题