Chinaunix首页 | 论坛 | 博客
  • 博客访问: 604294
  • 博文数量: 298
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 3077
  • 用 户 组: 普通用户
  • 注册时间: 2019-06-17 10:57
文章分类

全部博文(298)

文章存档

2022年(96)

2021年(201)

2019年(1)

我的朋友

分类: Java

2021-06-26 20:13:34


1. 找到项目maven目录

fe96800a00b4496b84afabf5d5247520.png

2.在自己项目里面建相同包名,类名

package org.flowable.ui.modeler.conf; 重写ModelerSecurityConfiguration

点击(此处)折叠或打开

  1. package org.flowable.ui.modeler.conf;

  2. import org.flowable.ui.common.security.SecurityConstants;
  3. import org.springframework.context.annotation.Configuration;
  4. import org.springframework.core.annotation.Order;
  5. import org.springframework.security.config.annotation.web.builders.HttpSecurity;
  6. import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
  7. import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
  8. import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;

  9. /**
  10.  * 说明:重构ModelerSecurity
  11.  * from:fhadmin.org
  12.  */
  13. @Configuration(proxyBeanMethods = false)
  14. @EnableWebSecurity
  15. public class ModelerSecurityConfiguration {

  16.     @Configuration
  17.     @Order(SecurityConstants.MODELER_API_SECURITY_ORDER)
  18.     public static class ModelerApiWebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter {
  19.         
  20.         @Override
  21.         protected void configure(HttpSecurity http) throws Exception {
  22.             
  23.             SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
  24.             successHandler.setTargetUrlParameter("redirectTo");

  25.             http.headers().frameOptions().disable();
  26.             
  27.             http.csrf().disable().authorizeRequests().antMatchers("/**/**").permitAll().anyRequest().authenticated().and().httpBasic();
  28.         }

  29.     }

  30. }




阅读(1409) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~