docs 补充项目注释
This commit is contained in:
+23
@@ -20,7 +20,13 @@ import java.util.Base64;
|
||||
*/
|
||||
public class ActuatorAuthFilter implements Filter {
|
||||
|
||||
/**
|
||||
* 认证用户名。
|
||||
*/
|
||||
private final String username;
|
||||
/**
|
||||
* 认证密码。
|
||||
*/
|
||||
private final String password;
|
||||
|
||||
/**
|
||||
@@ -34,6 +40,15 @@ public class ActuatorAuthFilter implements Filter {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验 Actuator Basic Auth 请求。
|
||||
*
|
||||
* @param servletRequest 原始请求
|
||||
* @param servletResponse 原始响应
|
||||
* @param filterChain 过滤器链
|
||||
* @throws IOException IO 异常
|
||||
* @throws ServletException Servlet 异常
|
||||
*/
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
@@ -63,10 +78,18 @@ public class ActuatorAuthFilter implements Filter {
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化过滤器。
|
||||
*
|
||||
* @param filterConfig 过滤器配置
|
||||
*/
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 销毁过滤器。
|
||||
*/
|
||||
@Override
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
+6
@@ -13,8 +13,14 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
public class SecurityConfig {
|
||||
|
||||
/**
|
||||
* 认证用户名。
|
||||
*/
|
||||
@Value("${spring.boot.admin.client.username}")
|
||||
private String username;
|
||||
/**
|
||||
* 认证密码。
|
||||
*/
|
||||
@Value("${spring.boot.admin.client.password}")
|
||||
private String password;
|
||||
|
||||
|
||||
+5
@@ -11,6 +11,11 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@SpringBootApplication
|
||||
public class SnailAiServerApplication {
|
||||
|
||||
/**
|
||||
* Snail AI 服务启动入口。
|
||||
*
|
||||
* @param args 启动参数
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
com.aizuda.snail.ai.starter.SnailAiSpringbootApplication.main(args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user