• 微服务监控中心springbootadmin 配置登录密码


    1. pom 加入 security

    		<!-- 加入密码认证 -->
    		<dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-security</artifactId>
            </dependency>

    2. 加入配置类 SecuritySecureConfig

    package org.fh.config;
     
    import org.springframework.context.annotation.Configuration;
    import org.springframework.security.config.annotation.web.builders.HttpSecurity;
    import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
    import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
     
    import de.codecentric.boot.admin.server.config.AdminServerProperties;
     
    /**
     * 说明:SecuritySecure配置
     * 作者:FH Admin
     * from:fhadmin.cn
     */
    @Configuration
    public class SecuritySecureConfig extends WebSecurityConfigurerAdapter {
     
    	private final String adminContextPath;
     
    	public SecuritySecureConfig(AdminServerProperties adminServerProperties) {
    		this.adminContextPath = adminServerProperties.getContextPath();
    	}
     
    	@Override
    	protected void configure(HttpSecurity http) throws Exception {
     
    		SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
    		successHandler.setTargetUrlParameter("redirectTo");
     
    		http.headers().frameOptions().disable();
    		
    		http.authorizeRequests().antMatchers(adminContextPath + "/assets/**",adminContextPath + "/actuator/**").permitAll()
    				.antMatchers(adminContextPath + "/login").permitAll().anyRequest().authenticated().and().formLogin()
    				.loginPage(adminContextPath + "/login").successHandler(successHandler).and().logout()
    				.logoutUrl(adminContextPath + "/logout").and().httpBasic().and().csrf().disable();
     
    	}
    	
    }

    3.  配置 application.properties

    #开启安全认证 用户名和密码
    spring.security.user.name=fhadmin
    spring.security.user.password=root
    spring.security.basic.enabled=true
      ​-----------------------------------------------------------------自定义表单
    28. 定义模版:拖拽左侧表单元素到右侧区域,编辑表单元素,保存表单模版
    29. 表单模版:编辑维护表单模版,复制表单模版,修改模版类型,预览表单模版
    30. 我的表单:选择表单模版,编辑表单规则,是否上传图片、附件、开启富文本、挂靠流程开关等
    31. 表单数据:从我的表单进去可增删改查表单数据,修改表单规则
    32. 挂靠记录:记录表单数据和流程实例ID关联记录,可删除
  • 相关阅读:
    [转]C#获取程序当前路径的方法
    [解决办法]未在本地计算机上注册“Mircosoft.Jet.OleDB.4.0”提供程序
    [解决办法]正在尝试使用已关闭或释放并且不再有效的 SPWeb 对象
    PowerShell学习笔记
    DNS
    在C#编程中,如何将Excel保存为2003的格式
    SAAS相关网络资源
    LCID及Culture Name列表
    Microsoft's naming conventions (微软命名规范)
    C#中如何结束Excel (Office)进程
  • 原文地址:https://www.cnblogs.com/m13002622490/p/16362326.html
Copyright © 2020-2023  润新知