diff --git a/jimureport-example/README.md b/jimureport-example/README.md
index 54ea6dc..175239f 100644
--- a/jimureport-example/README.md
+++ b/jimureport-example/README.md
@@ -20,7 +20,7 @@
org.jeecg.modules.JimuReportApplication
-- 第四步: 访问项目
+- 第四步: 访问项目(默认账号:admin 密码:123456)
报表工作台: http://localhost:8085/jmreport/list
@@ -51,7 +51,7 @@ Docker镜像制作
docker-compose up -d
-- 第五步:访问报表
+- 第五步:访问报表(默认账号:admin 密码:123456)
报表工作台: http://localhost:8085/jmreport/list
diff --git a/jimureport-example/pom.xml b/jimureport-example/pom.xml
index a21c329..5730741 100644
--- a/jimureport-example/pom.xml
+++ b/jimureport-example/pom.xml
@@ -12,7 +12,7 @@
jimureport-example
org.jeecg
jimureport-example
- 1.7
+ 1.8
http://www.jimureport.com
积木报表集成示例
@@ -45,7 +45,7 @@
- 1.7.9
+ 1.8.0
1.8
8.0.3
@@ -73,6 +73,12 @@
org.jeecgframework.jimureport
jimureport-dashboard-spring-boot-starter
1.8.0-beta
+
+
+ org.jeecgframework.jimureport
+ jimureport-spring-boot-starter
+
+
@@ -98,6 +104,12 @@
spring-boot-starter-freemarker
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
io.minio
diff --git a/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/CustomLoginSuccessHandler.java b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/CustomLoginSuccessHandler.java
new file mode 100644
index 0000000..fd19a33
--- /dev/null
+++ b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/CustomLoginSuccessHandler.java
@@ -0,0 +1,27 @@
+package com.jeecg.modules.jmreport.config;
+
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+
+/**
+ * 自定义springsecurity登录成功处理
+ * [TV360X-1884]jimureport-example集成简单的 spring security,设置登录账号密码
+ * @author chenrui
+ * @date 2024/8/2 16:26
+ */
+public class CustomLoginSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler {
+
+ @Override
+ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
+ Authentication authentication) throws IOException, ServletException {
+ HttpSession session = request.getSession();
+ session.setAttribute("loginFrom", "jimu_example");
+ super.onAuthenticationSuccess(request, response, authentication);
+ }
+}
\ No newline at end of file
diff --git a/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/SpringSecurityConfig.java b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/SpringSecurityConfig.java
new file mode 100644
index 0000000..a013c50
--- /dev/null
+++ b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/SpringSecurityConfig.java
@@ -0,0 +1,38 @@
+package com.jeecg.modules.jmreport.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.web.SecurityFilterChain;
+
+/**
+ * spring security 配置
+ * [TV360X-1884]jimureport-example集成简单的 spring security,设置登录账号密码
+ * @Author chenrui
+ * @Date 2024-07-23
+ */
+@Configuration
+@EnableWebSecurity
+public class SpringSecurityConfig {
+
+
+ @Bean
+ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+ http.csrf().disable()
+ .authorizeRequests()
+ .antMatchers("/login/**").permitAll()
+ .anyRequest().authenticated()
+ .and()
+ .formLogin()
+ .loginPage("/login/login.html")
+ .loginProcessingUrl("/login")
+ .successHandler(new CustomLoginSuccessHandler())
+ .permitAll().and()
+ .logout()
+ .invalidateHttpSession(true)
+ .clearAuthentication(true).permitAll();
+
+ return http.build();
+ }
+}
diff --git a/jimureport-example/src/main/java/com/jeecg/modules/jmreport/testdb/TestRpSpringBean.java b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/testdb/TestRpSpringBean.java
index c8f6acd..a9c1956 100644
--- a/jimureport-example/src/main/java/com/jeecg/modules/jmreport/testdb/TestRpSpringBean.java
+++ b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/testdb/TestRpSpringBean.java
@@ -1,6 +1,7 @@
package com.jeecg.modules.jmreport.testdb;
import lombok.extern.slf4j.Slf4j;
+import org.jeecg.modules.jmreport.common.util.OkConvertUtils;
import org.jeecg.modules.jmreport.desreport.model.JmPage;
import org.jeecg.modules.jmreport.api.data.IDataSetFactory;
import org.springframework.stereotype.Component;
@@ -60,7 +61,7 @@ public class TestRpSpringBean implements IDataSetFactory {
JmPage page = new JmPage();
List