Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use hikari connection pool for password decryption

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "using hikari connection pool for password decryption". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian and study and learn "using hikari connection pool for password decryption" together.

The idea is to create a new class that inherits from HikariDataSource (similar to other data connection pools), then rewrite the getPassWord method, call the super.getPassword() of the parent class to get the configured value, and then decrypt and return

public class XXXDataSource extends HikariDataSource {

@Override

public String getPassword(){

String psw = super.getPassword();

return PasswordUtil.decValue(pws);//decryption tool writes itself

}

}

application.yml file

spring:

datasource:

jdbcUrl: jdbc:mysql://127.0.0.1:3306/jby? serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false

username: root

password: 'f687101570bae7ce4d313c2b4440f4ae'

type:com.xxx.XXXDataSource #Own inheritance class

Thank you for reading, the above is the content of "using hikari connection pool for password decryption". After studying this article, I believe everyone has a deeper understanding of the problem of using hikari connection pool for password decryption. The specific use situation still needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report