spring-boot LS does not work and does not show up in lsp logs
Issue:
:checkhealth vim.lsp command never shows spring-boot LS and suggestions do not work in application.yml/application.properties.
Description:
My setup:
-
vscode-spring-boot-toolsandjdtlsinstalled with Mason. -
nvim-jdtlssetup withftplugin. -
lazy.nvimconfiguration fornvim-jdtlsandspring-boot.nvim:
{
"mfussenegger/nvim-jdtls",
dependencies = { "mfussenegger/nvim-dap" }
},
{
"JavaHello/spring-boot.nvim",
dependencies = { "mfussenegger/nvim-jdtls" },
lazy = true,
opts = {}
}
- My
ftpluginconfig for java and yaml:
local data_path = "..." -- path to constructed data directory for the project
local jdtls_bin = "..." -- path to JDTLS binary
local lombok_jar = "..." -- path to Lombok jar
local bundles = {}
vim.list_extend(bundles, require("spring_boot").java_extensions())
vim.list_extend(bundles, vim.split(vim.fn.glob(".../vscode-java-test/server/*.jar"), "\n"))
vim.list_extend(bundles, vim.split(vim.fn.glob(".../java-debug/com.microsoft.java.debug.plugin/target/*.jar"), "\n"))
jdtls.start_or_attach({
cmd = {
jdtls_bin,
"--jvm-arg=-javaagent:" .. lombok_jar,
"-data", data_path
},
root_dir = vim.fs.dirname(vim.fs.find({ "gradlew", ".git", "mvnw" }, { upward = true })[1]),
init_options = { bundles = bundles }
})
- The
jdtlsLS works well, completion in java files is present, no issues. The:checkhealth vim.lspcommand always show it properly.java-testsetup and debugging also work fine.
The problem:
- The
spring-bootLS never shows up in:checkhealth vim.lsporlsp.log. - Sometimes when I open java or yaml file I get the message
Spring Boot LS is not installed. (I can fix this one by manually providingls_pathto the opts inspring-boot.nvimconfiguration, but it looks like something else is wrong)
{
"JavaHello/spring-boot.nvim",
ft = {"java", "yaml", "jproperties"},
dependencies = {
"mfussenegger/nvim-jdtls",
},
---@type bootls.Config
opts = {}
}
Try this configuration
@JavaHello, thank you for your response!
This configuration also did not work, unfortunately.
When yml file is opened, there are no errors. But the :checkhealth vim.lsp still only shows JDTLS (started by ftplugin/yaml.lua) and yamlls if I install it. application.yml completion also does not work.
However, if I provide ls_path to the opts table - there is strange behavior:
- Opening java files works without issues, but the
spring-bootLS is still not present in:checkhealth vim.lsp. - But if I open yml file - I get an error:
Client spring-boot quit with exit code 1 and signal 0. Check log for errors: /home/user/.local/state/nvim/lsp.log. And there is an error in log:[ERROR][2025-07-20 13:15:10] ...p/_transport.lua:36 "rpc" "/usr/lib/jvm/java-21-openjdk/bin/java" "stderr" "Error: Could not find or load main class org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp\nCaused by: java.lang.ClassNotFoundException: org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp\n"
If you specify the ls_path directory, make sure there is a lib directory under ls_path, which contains the dependent jar packages
@JavaHello, just double-checked it, confirmed that the lib directory with jar packages is present under the ls_path I specified.
This path leads to vscode-spring-boot-tools installed by mason (.../mason/packages/vscode-spring-boot-tools/extension/language-server), which I expected to be automatically resolved by the plugin, but sometimes it fails. But even when it doesn't - appication.yml completions do not work, and spring-boot LS still doesn't log anything.
@JavaHello please provide solution for this issue
@keen-dot-dev
I was also getting the Spring Boot LS is not installed error when opening up a java file.
I solved it by simply installing vscode-spring-boot-tools through Mason.
Did you end up fixing that issue in particular?
@goldeneas unfortunately, installing vscode-spring-boot-tools using Mason didn't help. So far, I did not find the solution or the root cause of my problem.
I've figured out to configure nvim-java instead of using spring-boot.nvim directly. So there's a suggested config in nvim-java docs where spring-boot-tools version 1.55.1 is specified. Nothing worked with 1.64. After downgrading nvim-java started to work. Vscode is installing 1.64 currently.
Perhaps if you downgrade spring-boot-tools to 1.5x it should start working. Maybe spring-boot.nvim does not support 1.6x but I'm not sure.
I’ve also worked with nvim-java, but since the maintainer is no longer actively maintaining it, I’m exploring a DIY setup for it.