스프링 보안이 적용된 웹 응용 프로그램이 있습니다.스프링 보안 weblogic js로드
tomcat9
에서 앱을 실행할 때 oracle Weblogic을 사용할 때 문제가 발생하고 앱의 js 스크립트가 작동하지 않습니다.
해당 MIME 유형 ('application/octet-stream
')이 실행 가능하지 않으며 엄격한 MIME 유형 검사가 사용 가능하므로 'http://localhost:7001/ais/s/lib/datetime/js/moment-with-locales.min.js'에서 스크립트 실행을 거부했습니다.
이 내 보안 설정입니다 :
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
UserService service;
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/s/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.permitAll()
.and()
.logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.permitAll();
}
@Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception {
auth
.userDetailsService(new UserDetailServiceImpl(service));
}
}
, 당신은 몇 가지 추가 구성이 필요의 SecurityConfig에 넣어 그것을 해결. 프로젝트에'WEB-INF' 폴더가 있습니까? –
@AtaurRahmanMunna 예, js css,/views/ – Coder
및 xml : dispatcher-servlet, web, weblogic, jdbc, tiles가있는/s/폴더가 있습니다. – Coder