当我使用Spring Security添加spring boot admin登录ui时,它将不会加载CSS

时间:2018-10-14 15:55:03

标签: spring spring-boot spring-security spring-web spring-boot-admin

我添加了具有安全性的spring boot admin ui,但是未加载登录页面CSS。它给了我MIME类型不受支持的错误。

任何人都可以提供解决此问题的解决方案吗?

	@Configuration
	public static class SecurityConfig extends WebSecurityConfigurerAdapter {
		@Override
		protected void configure(HttpSecurity http) throws Exception {
			http.formLogin().loginPage("/login.html").loginProcessingUrl("/login").permitAll();
			http.logout().logoutUrl("/logout");
			http.csrf().disable();

			http.authorizeRequests().antMatchers("/login.html", "/**/*.css", "/img/**", "/third-party/**").permitAll();
			http.authorizeRequests().antMatchers("/**").authenticated();
			http.authorizeRequests()
					.antMatchers("/resources/**")
					.permitAll();

			http.httpBasic();
		}

this is the Error

0 个答案:

没有答案