关于 spring-boot-admin ,客户端配置
About spring-boot-admin ,Client configuration
我正在阅读 official manual 试图构建一个 v2.0.1
spring-boot-admin
project.When 我编译了项目,发生错误。
"Error:(17, 23) java: Unable to access javax.servlet.Filter Could not find the class file for javax.servlet.Filter"
我正在尝试添加一个新的 dependency 以防止发生此错误。但是没有成功。
这是我的配置代码,请问如何让客户端正常启动。 My code
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@SpringBootApplication
public class Adminclient21Application {
public static void main(String[] args) {
SpringApplication.run(Adminclient21Application.class, args);
}
@Configuration
public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().permitAll()
.and().csrf().disable();
}
}
}
尝试添加依赖,我得到了同样的错误,添加下面后解决
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
我正在阅读 official manual 试图构建一个 v2.0.1
spring-boot-admin
project.When 我编译了项目,发生错误。
"Error:(17, 23) java: Unable to access javax.servlet.Filter Could not find the class file for javax.servlet.Filter"
我正在尝试添加一个新的 dependency 以防止发生此错误。但是没有成功。
这是我的配置代码,请问如何让客户端正常启动。 My code
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@SpringBootApplication
public class Adminclient21Application {
public static void main(String[] args) {
SpringApplication.run(Adminclient21Application.class, args);
}
@Configuration
public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().permitAll()
.and().csrf().disable();
}
}
}
尝试添加依赖,我得到了同样的错误,添加下面后解决
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>