| | |
| | | @Resource |
| | | private UserDetailsService userDetailsService; |
| | | |
| | | |
| | | @Override |
| | | protected void configure(HttpSecurity http) throws Exception { |
| | | System.out.println(4444414); |
| | | http.httpBasic().and(). |
| | | cors().and().csrf().disable() |
| | | .exceptionHandling().authenticationEntryPoint(authenticationEntryPoint()) |
| | |
| | | .authorizeRequests() |
| | | .antMatchers(HttpMethod.OPTIONS, "/**").permitAll() |
| | | .antMatchers("/login").permitAll() |
| | | .antMatchers("/cms/**").permitAll() |
| | | .antMatchers("/html").permitAll() |
| | | .antMatchers("/swagger**/**").permitAll() |
| | | .antMatchers("/webjars/**").permitAll() |
| | |
| | | .antMatchers("/api/common/doUpload").permitAll() |
| | | .antMatchers("/api/common/uploadFile").permitAll() |
| | | .antMatchers("/api/messageBoard/addMessage").permitAll() |
| | | .antMatchers("/api/article/webArticleInPage").permitAll() |
| | | .antMatchers("/api/column/webColumnInList").permitAll() |
| | | .antMatchers("/image/**").permitAll() |
| | | .anyRequest().authenticated() |
| | | .and().apply(securityConfiguereAdapter()); |
| | |
| | | } |
| | | |
| | | public TokenConfigurer securityConfiguereAdapter() { |
| | | System.out.println(33333333); |
| | | return new TokenConfigurer(); |
| | | } |
| | | } |