SpringBoot的Security安全控制—企业项目中的SpringSecurity操作
liuian 2025-07-27 21:59 11 浏览
企业项目中的Spring Security操作
面的章节从内置数据入手开始介绍Spring Security的入门案例。在实际的企业级开发中,一般不会把用户名和密码固定在代码或者配置文件中,而是直接在数据库中查询用户的账号和密码,再将其和用户输入的账号和密码进行对比并认证,最终完成用户的认证和授权查询。下面使用国内目前常用的两个数据库操作框架(Spring Data JPA和MyBatis)完成对SpringSecurity的查询和认证,读者只需要掌握其中的一个框架即可,建议优先选用自己熟悉的框架。
实战:基于JPA的Spring Boot Security操作
新建一个spring-security-db-demo项目,具体步骤如下:
(1)在pom.xml中添加Spring Security和JPA,即MySQL和Web开发所需要的依赖,代码如下:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.10.RELEASE</version>
<relativePath/>
</parent>
<groupId>com.example</groupId>
<artifactId>spring-security-db-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>spring-security-db-demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--spring data jpa-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--spring security-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--thymeleaf模板-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!--thymeleaf中使用的Spring Security标签-->
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
<!-- <version>3.0.3.RELEASE</version>-->
</dependency>
<dependency>
<groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.5.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
(2)为了让项目开发具有多样性,本次使用的配置文件格式是yml,在application.yml中添加项目配置,用来配置数据库的连接信息。使用sys数据库的配置信息如下:
server:
port: 8080
spring:
datasource:
username: root
password: 123456
url: jdbc:mysql://127.0.0.1:3306/sys
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate: ddl-auto: update
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
open-in-view: false
(3)开始编写项目代码,新建Security的配置文件WebSecurityConfig.java:
package com.example.springsecuritydbdemo.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.Authentication
Provider;
import
org.springframework.security.authentication.dao.DaoAuthentication
Provider;
import org.springframework.security.config.annotation.authentication.
builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.
configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.
HttpSecurity;
import
org.springframework.security.config.annotation.web.configuration.
WebSecurityConfigurerAdapter;
import
org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.factory.PasswordEncoder
Factories;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.rememberme.
JdbcTokenRepositoryImpl;
import org.springframework.security.web.authentication.rememberme.
PersistentTokenRepository;
import javax.sql.DataSource;/**
* 开启security注解
*/
@Configuration
@EnableGlobalMethodSecurity(securedEnabled = true)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private UserDetailsService userDetailsService;
@Autowired
private PersistentTokenRepository persistentTokenRepository;
@Override
protected void configure(AuthenticationManagerBuilder auth) throws
Exception {
auth.authenticationProvider(authenticationProvider());
}
@Override
protected void configure(HttpSecurity http) throws Exception {
//关闭csrf
http.csrf().disable();
// 自定义登录页面
http.formLogin()
.loginPage("/loginPage") // 登录页面的
URL
// 登录访问路径,不用自己处理逻辑,只需要定义URL即可
.loginProcessingUrl("/login")
.failureUrl("/exception") // 登录失败时跳
转的路径
.defaultSuccessUrl("/index", true); // 登录成功后跳
转的路径
// URL的拦截与放行,除//loginPage、/hello、/exception和/*.jpg之外的
路径都会被拦截
http.authorizeRequests()
.antMatchers("/loginPage", "/hello", "/exception",
"/*.jpg").permitAll()
.anyRequest().authenticated();
// 注销用户
http.logout().logoutUrl("/logout");
// 记住密码(自动登录) http.rememberMe().tokenRepository(persistentTokenRepository).
tokenValiditySeconds(60 * 60).userDetailsService(userDetailsService);
}
/**
* 登录提示
*/
@Bean
public AuthenticationProvider authenticationProvider() {
DaoAuthenticationProvider provider = new
DaoAuthenticationProvider();
// 显示用户找不到异常,默认不论用户名和密码哪个错误,都提示密码错误
provider.setHideUserNotFoundExceptions(false);
provider.setPasswordEncoder(passwordEncoder());
provider.setUserDetailsService(userDetailsService);
return provider;
}
/**
* 密码加密器
*/
@Bean
public PasswordEncoder passwordEncoder() {
return
PasswordEncoderFactories.createDelegatingPasswordEncoder();
}
/**
* 记住密码,并存储Token
*/
@Bean
public PersistentTokenRepository
persistentTokenRepository(DataSourcedataSource) {
// 数据存储在数据库中
JdbcTokenRepositoryImpl jdbcTokenRepository = new
JdbcTokenRepositoryImpl();
jdbcTokenRepository.setDataSource(dataSource);
return jdbcTokenRepository;
}
}
(4)新建Web请求的UserControllerjava入口文件,并定义其访问的URL:
package com.example.springsecuritydbdemo.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.annotation.Secured;
import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.util.WebUtils;
import javax.servlet.http.HttpServletRequest;
@Controller
@Slf4j
public class UserController {
@ResponseBody
@RequestMapping("/hello")
public String hello() {
return "hello";
}
/**
* 登录页面
*/
@GetMapping("/loginPage")
public String login() {
return "login";
}
/**
* Security 认证异常处理
*/
@GetMapping("/exception")
public String error(HttpServletRequest request) {
// 获取Spring Security的AuthenticationException异常并抛出,由全局异
常统一处理
AuthenticationException exception = (AuthenticationException)
WebUtils.getSessionAttribute(request,
"SPRING_SECURITY_LAST_EXCEPTION");
if (exception != null) {
throw exception;
}
return "redirect:/loginPage";
}
@GetMapping({"/index", "/"})
public String index() {
return "index";
}
@ResponseBody
@GetMapping("/role/teacher")
@Secured({"ROLE_teacher", "ROLE_admin"})
public String teacher() {
return "模拟获取老师数据";
}
@ResponseBody
@GetMapping("/role/admin")
@Secured({"ROLE_admin"})
public String admin() {
return "模拟获取管理员数据";
}
@ResponseBody
@GetMapping("/role/student")
@Secured({"ROLE_student", "ROLE_admin"})
public String student() {
return "模拟获取学生数据";
}
}
(5)新建UserDao.java文件和AuthoritiesDao.java文件进行数据库的操作。
UserDao.java文件的内容如下:
package com.example.springsecuritydbdemo.dao;
import com.example.springsecuritydbdemo.entity.Authorities;
import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface AuthoritiesDao extends
JpaRepository<Authorities, Integer>, JpaSpecificationExecutor
<Authorities> {
}
AuthoritiesDao.java文件的内容如下:
package com.example.springsecuritydbdemo.dao;
import com.example.springsecuritydbdemo.entity.Users;
import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface UsersDao extends
JpaRepository<Users, Integer>, JpaSpecificationExecutor<Users>
{
Users findByUsername(String username);
}
(6)新建数据库的表对应的实体类Authorities、PersistentLogins和Users。Authorities类如下:
package com.example.springsecuritydbdemo.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
@Getter
@Setter
@Entity
@Table(name = "authorities")
public class Authorities {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String authority;
@ManyToMany(mappedBy = "authorities", cascade = CascadeType.ALL)
private Set<Users> users = new HashSet<>();
}
PersistentLogins类的内容如下:
package com.example.springsecuritydbdemo.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;@Getter
@Setter
@Entity
@Table(name = "persistent_logins")
public class PersistentLogins {
@Id
private String series;
private String username;
private String token;
private Date last_used;
}
Users类的内容如下:
package com.example.springsecuritydbdemo.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
@Getter
@Setter
@Entity
@Table(name = "users")
public class Users {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String username;
private String password;
@ManyToMany(targetEntity = Authorities.class, cascade =
CascadeType.ALL)
@JoinTable(name = "users_authorities", joinColumns = @JoinColumn(name = "users_id",
referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name =
"authorities_id",referencedColumnName = "id"))
private Set<Authorities> authorities = new HashSet<>();
}
(7)设置项目的全局异常处理:
package com.example.springsecuritydbdemo.exception;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentials
Exception;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;
/**
* 全局异常处理
*/
@ControllerAdvice
@Slf4j
public class GlobalExceptionHandler {
@ExceptionHandler(RuntimeException.class)
public ModelAndView exception(Exception e) {
log.info(e.toString());
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("error");
if (e instanceof BadCredentialsException) {
// 密码错误
modelAndView.addObject("msg", "密码错误");
} else if (e instanceof AccessDeniedException) {
// 权限不足
modelAndView.addObject("msg", e.getMessage());
} else { // 其他
modelAndView.addObject("msg", "系统错误");
}
return modelAndView;
}
}
(8)设置用户的服务类,代码如下:
package com.example.springsecuritydbdemo.service;
import com.example.springsecuritydbdemo.dao.UsersDao;
import com.example.springsecuritydbdemo.entity.Authorities;
import com.example.springsecuritydbdemo.entity.Users;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGranted
Authority;
import org.springframework.security.core.userdetails.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Set;
@Service("userDetailsService")
@Slf4j
public class UserDetailService implements UserDetailsService {
@Autowired
private UsersDao usersDao;
@Override
@Transactional
public UserDetails loadUserByUsername(String s) throws
UsernameNotFound
Exception {
Users users = usersDao.findByUsername(s); // 用户不存在
if (users == null) {
log.error("用户名:[{}]不存在", s);
throw new UsernameNotFoundException("用户名不存在");
}
// 获取该用户的角色信息
Set<Authorities> authoritiesSet = users.getAuthorities();
ArrayList<GrantedAuthority> list = new ArrayList<>();
for (Authorities authorities : authoritiesSet) {
list.add(new
SimpleGrantedAuthority(authorities.getAuthority()));
}
return new User(users.getUsername(), users.getPassword(),
list);
}
}
(9)新建Spring Boot项目的启动类:
package com.example.springsecuritydbdemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.security.config.annotation.web.configuration.
EnableWebSecurity;
@EnableWebSecurity
@SpringBootApplication
public class SpringSecurityDbDemoApplication {
public static void main(String[] args) {
SpringApplication.run(SpringSecurityDbDemoApplication.class,
args);
}
}
提示:在启动项目之前需要配置好数据库。本书使用MySQL 8。数据库的配置信息保存在application.yml文件中,读者可以根据实际情况修改数据库信息,确认无误后即可启动项目。
访问
http://localhost:8080/loginPage即可可以看到登录页面,如图5.10所示。使用账号admin和密码123456登录后,可以看到admin拥有的权限,如图5.11所示。退出admin后使用账号student和密码123456登录,查看student拥有的权限,如图5.12所示。可以看到,不同的用户拥有不同的权限,从而实现使用JPA控制不同用户权限的目的。
可以看到,不同的账号访问,拥有不同的权限,权限不同看到的数据也不同。
实战:基于MyBatis的Spring Boot Security操作
基于5.3.1小节的代码,全部注释掉UserDao.java文件和AuthoritiesDao.java文件,修改后缀名为UserDao.java.bak和AuthoritiesDao.java.bak,再修改entity包中的实体类。
主要步骤如下:
(1)移除pom.xml中的JPA依赖,在pom.xml中添加MyBatis的依赖:
<!--spring data jpa-->
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>-->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
(2)修改
SpringSecurityDbDemoApplication.java文件,增加一个MyBatis的配置注解:
@MapperScan("com.example.springsecuritydbdemo.dao")
(3)修改entity包中所有的实体类,去除所有的JPA注解。
Authorities类的文件内容如下:
package com.example.springsecuritydbdemo.entity;
import lombok.Data;
@Data
public class Authorities {
private Integer id;
private String authority;
}
PersistentLogins类的文件内容如下:
package com.example.springsecuritydbdemo.entity;
import lombok.Data;
import java.util.Date;
@Data
public class PersistentLogins {
private String series;
private String username;
private String token;
private Date last_used;
}
Users类的文件内容如下:
package com.example.springsecuritydbdemo.entity;
import lombok.Data;
import java.util.HashSet;
import java.util.Set;
@Data
public class Users {
private Integer id;
private String username;
private String password;
private Set<Authorities> authorities = new HashSet<>();
}
(4)修改Dao包中的数据库操作接口,添加查询用户的方法:
package com.example.springsecuritydbdemo.dao;
import com.example.springsecuritydbdemo.entity.Authorities;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import java.util.Set;
@Mapper
public interface AuthoritiesDao {
@Select("select a.* from authorities a LEFT JOIN users_authorities
b " +
"on a.id=b.authorities_id where b.users_id=#{userId}")
@ResultType(Set.class)
Set<Authorities> findByUserId(@Param("userId") Integer userId);
}
(5)添加查询用户和保存用户的方法:
package com.example.springsecuritydbdemo.dao;
import com.example.springsecuritydbdemo.entity.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface UsersDao {
@Select("select * from users where username=#{username}")
Users findByUsername(@Param("username") String username);
void save(Users users);
}
(6)在sys数据库中执行SQL语句,用来创建3张表,代码如下:
CREATE TABLE `authorities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`authority` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `persistent_logins` (
`series` varchar(100) NOT NULL,
`username` varchar(255) DEFAULT NULL,
`token` varchar(255) DEFAULT NULL,
`last_used` datetime DEFAULT NULL,
PRIMARY KEY (`series`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
修改完成后启动项目,再次访问http://localhost:8080,如同5.3.1小节的例子一样登录不同的账号,确认不同的用户拥有不同的权限。通过以上开发实践可以看到,在一些简单的数据库操作中,JPA不需要编写SQL语句,这样会明显地提高开发效率,使用起来也非常方便。
相关推荐
- 快速上手maven
-
Maven的作用在开发过程中需要用到各种各样的jar包,查找和下载这些jar包是件费时费力的事,特别是英文官方网站,可以将Maven看成一个整合了所有开源jar包的合集,我们需要jar包只需要从Mav...
- Windows系统——配置java环境变量
-
怎么配置java环境变量呢?首先是安装好jdk然后我的电脑右键选择属性然后选择左侧高级系统设置高级然后点环境变量然后在用户变量或系统变量中配置,用户变量指的是只有当前用户可用,系统变量指的是系统中...
- ollama本地部署更改默认C盘,Windows配置环境变量方法
-
ollama是一个大语言模型(LLM——LargeLanguageModel),本地电脑安装网上也要很多教程,看上去非常简单,一直下一步,然后直接就可以使用了。但是我在实操的时候并不是这样,安装完...
- # Windows 环境变量 Path 显示样式更改
-
#怎样学习Java##Windows环境变量Path显示样式更改##1、传统Path环境变量显示:```---》键盘上按【WIN+I】打开系统【设置】---》依次点击---》【系统...
- 如何在Windows中创建用户和系统环境变量
-
在Windows中创建环境变量之前您应该了解的事情在按照本指南中所示的任何步骤创建指向文件夹、文件或其他任何内容的用户和系统变量之前,您应该了解两件事。第一个也是最重要的一个是了解什么是环境变量。...
- Windows 中的环境变量是什么?
-
Windows中的环境变量是什么?那么,Windows中的环境变量是什么?简而言之,环境变量是描述应用程序和程序运行环境的变量。所有类型的程序都使用环境变量来回答以下问题:我安装的计算机的名称是什么...
- 【Python程序开发系列】谈一谈Windows环境变量:系统和用户变量
-
这是我的第350篇原创文章。一、引言环境变量(environmentvariables)一般是指在操作系统中用来指定操作系统运行环境的一些参数,如:临时文件夹位置和系统文件夹位置等。环境变量是在操作...
- 系统小技巧:还原Windows10路径环境变量
-
有时,我们在Windows10的“运行”窗口中执行一些命令或运行一些程序,这时即便没有指定程序的具体路径,只输入程序的名称(如notepad.exe),便可以迅速调用成功。这是因为Windows默认...
- Windows10系统的“环境变量”在哪里呢?
-
当我们在操作系统是Windows10的电脑里安装了一些软件,要通过配置环境变量才能使用软件时,在哪里能找到“环境变量”窗口呢?可以按照下面的步骤找到“环境变量”。说明:下面的步骤和截图是在Window...
- 系统小技巧:彻底弄懂Windows 10环境变量
-
每当我们进行系统清理时,清理软件总能自动找到Windows的临时文件夹之所在,然后加以清理,即便是我们重定向了TEMP目录也是如此。究其原因,是因为清理软件会根据TEMP环境变量来判断现有临时文件夹的...
- MySQL 5.7 新特性大全和未来展望
-
本文转自微信公众号:高可用架构作者:杨尚刚引用美图公司数据库高级DBA,负责美图后端数据存储平台建设和架构设计。前新浪高级数据库工程师,负责新浪微博核心数据库架构改造优化,以及数据库相关的服务器存...
- MySQL系列-源码编译安装(v8.0.25)
-
一、前言生产环境建议使用二进制安装法,其优点是部署简单、快速、方便,并且相对"yum/rpm安装"方法能更方便地自定义文件存放的目录结构,方便用脚本批量部署,方便日后运维管理。在生产...
- MySQL如何实时同步数据到ES?试试这款阿里开源的神器!
-
前几天在网上冲浪的时候发现了一个比较成熟的开源中间件——Canal。在了解了它的工作原理和使用场景后,顿时产生了浓厚的兴趣。今天,就让我们跟随我的脚步,一起来揭开它神秘的面纱吧。简介canal翻译为...
- 技术老兵十年专攻MySQL:编写了763页核心总结,90%MySQL问题全解
-
MySQL是开放源码的关系数据库管理系统,由于性能高、成本低、可靠性好,成为现在最流行的开源数据库。MySQL学习指南笔记领取方式:关注、转发后私信小编【111】即可免费获得《MySQL进阶笔记》的...
- Mysql和Hive之间通过Sqoop进行数据同步
-
文章回顾理论大数据框架原理简介大数据发展历程及技术选型实践搭建大数据运行环境之一搭建大数据运行环境之二本地MAC环境配置CPU数和内存大小查看CPU数sysctl machdep.cpu...
- 一周热门
-
-
Python实现人事自动打卡,再也不会被批评
-
【验证码逆向专栏】vaptcha 手势验证码逆向分析
-
Psutil + Flask + Pyecharts + Bootstrap 开发动态可视化系统监控
-
一个解决支持HTML/CSS/JS网页转PDF(高质量)的终极解决方案
-
再见Swagger UI 国人开源了一款超好用的 API 文档生成框架,真香
-
网页转成pdf文件的经验分享 网页转成pdf文件的经验分享怎么弄
-
C++ std::vector 简介
-
系统C盘清理:微信PC端文件清理,扩大C盘可用空间步骤
-
飞牛OS入门安装遇到问题,如何解决?
-
10款高性能NAS丨双十一必看,轻松搞定虚拟机、Docker、软路由
-
- 最近发表
- 标签列表
-
- python判断字典是否为空 (50)
- crontab每周一执行 (48)
- aes和des区别 (43)
- bash脚本和shell脚本的区别 (35)
- canvas库 (33)
- dataframe筛选满足条件的行 (35)
- gitlab日志 (33)
- lua xpcall (36)
- blob转json (33)
- python判断是否在列表中 (34)
- python html转pdf (36)
- 安装指定版本npm (37)
- idea搜索jar包内容 (33)
- css鼠标悬停出现隐藏的文字 (34)
- linux nacos启动命令 (33)
- gitlab 日志 (36)
- adb pull (37)
- python判断元素在不在列表里 (34)
- python 字典删除元素 (34)
- vscode切换git分支 (35)
- python bytes转16进制 (35)
- grep前后几行 (34)
- hashmap转list (35)
- c++ 字符串查找 (35)
- mysql刷新权限 (34)