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關聯記錄,可洗掉
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/488680.html
標籤:Java
