添加google-style 格式化maven插件,fix utf8文件编码问题

This commit is contained in:
Galudisu
2025-12-14 15:00:22 +08:00
parent f53b783049
commit a5fb62f1e5
300 changed files with 21281 additions and 25221 deletions

View File

@@ -1,30 +1,29 @@
package com.ruoyi.modules.monitor;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
/**
* 监控中心
*
*
* @author ruoyi
*/
@EnableAdminServer
@SpringBootApplication
public class RuoYiMonitorApplication
{
public static void main(String[] args)
{
SpringApplication.run(RuoYiMonitorApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
}
public class RuoYiMonitorApplication {
public static void main(String[] args) {
SpringApplication.run(RuoYiMonitorApplication.class, args);
System.out.println(
"(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n"
+ " .-------. ____ __ \n"
+ " | _ _ \\ \\ \\ / / \n"
+ " | ( ' ) | \\ _. / ' \n"
+ " |(_ o _) / _( )_ .' \n"
+ " | (_,_).' __ ___(_ o _)' \n"
+ " | |\\ \\ | || |(_,_)' \n"
+ " | | \\ `' /| `-' / \n"
+ " | | \\ / \\ / \n"
+ " ''-' `'-' `-..-' ");
}
}

View File

@@ -9,43 +9,50 @@ import org.springframework.security.web.authentication.SavedRequestAwareAuthenti
/**
* 监控权限配置
*
*
* @author ruoyi
*/
@EnableWebSecurity
public class WebSecurityConfigurer
{
private final String adminContextPath;
public class WebSecurityConfigurer {
private final String adminContextPath;
public WebSecurityConfigurer(AdminServerProperties adminServerProperties)
{
this.adminContextPath = adminServerProperties.getContextPath();
}
public WebSecurityConfigurer(AdminServerProperties adminServerProperties) {
this.adminContextPath = adminServerProperties.getContextPath();
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception
{
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
@Bean
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
SavedRequestAwareAuthenticationSuccessHandler successHandler =
new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
return httpSecurity
.headers().frameOptions().disable()
.and().authorizeRequests()
.antMatchers(adminContextPath + "/assets/**"
, adminContextPath + "/login"
, adminContextPath + "/actuator/**"
, adminContextPath + "/instances/**"
).permitAll()
.anyRequest().authenticated()
.and()
.formLogin().loginPage(adminContextPath + "/login")
.successHandler(successHandler).and()
.logout().logoutUrl(adminContextPath + "/logout")
.and()
.httpBasic().and()
.csrf()
.disable()
.build();
}
return httpSecurity
.headers()
.frameOptions()
.disable()
.and()
.authorizeRequests()
.antMatchers(
adminContextPath + "/assets/**",
adminContextPath + "/login",
adminContextPath + "/actuator/**",
adminContextPath + "/instances/**")
.permitAll()
.anyRequest()
.authenticated()
.and()
.formLogin()
.loginPage(adminContextPath + "/login")
.successHandler(successHandler)
.and()
.logout()
.logoutUrl(adminContextPath + "/logout")
.and()
.httpBasic()
.and()
.csrf()
.disable()
.build();
}
}