File tree Expand file tree Collapse file tree 2 files changed +1
-25
lines changed
api-boot-samples/api-boot-sample-logging-admin/src/main
java/org/minbox/framework/api/boot/sample/logging/admin Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change 2121import org .slf4j .LoggerFactory ;
2222import org .springframework .boot .SpringApplication ;
2323import org .springframework .boot .autoconfigure .SpringBootApplication ;
24- import org .springframework .context .annotation .Configuration ;
25- import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
26- import org .springframework .security .config .annotation .web .configuration .WebSecurityConfigurerAdapter ;
27- import org .springframework .security .web .authentication .SavedRequestAwareAuthenticationSuccessHandler ;
2824
2925/**
3026 * @author:恒宇少年 - 于起宇
@@ -46,23 +42,4 @@ public static void main(String[] args) {
4642 SpringApplication .run (ApiBootLoggingAdminApplication .class , args );
4743 logger .info ("{}服务启动成功." , "" );
4844 }
49-
50- @ Configuration
51- public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
52-
53- @ Override
54- protected void configure (HttpSecurity http ) throws Exception {
55- SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler ();
56- successHandler .setTargetUrlParameter ("redirectTo" );
57- http .authorizeRequests ()
58- .antMatchers ("/assets/**" ).permitAll ()
59- .antMatchers ("/login" ).permitAll ()
60- .anyRequest ().authenticated ()
61- .and ()
62- .formLogin ().loginPage ("/login" ).successHandler (successHandler ).and ()
63- .logout ().and ()
64- .httpBasic ().and ()
65- .csrf ().disable ();
66- }
67- }
6845}
Original file line number Diff line number Diff line change 2323 # 显示上报日志
2424 show-console-report-log : true
2525 # 格式化上报日志
26- format-console-log-json : true
27- cache-templates : false
26+ format-console-log-json : true
You can’t perform that action at this time.
0 commit comments