Nacos change default password

1. Add dependencies

 <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-crypto</artifactId>
            <version>5.6.2</version>
        </dependency>

2. Generate a password and modify the password of the user in the data table users

package com.leo.nacos;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class PasswordEncoderUtil {
    public static void main(String[] args) {
        String encode = new BCryptPasswordEncoder().encode("123456");
        // $2a$10$FtfSsr13zZVv/5Vxjj7mUec0Dgk.fgG5ovd/o4VRnC7R/KTdCaKFC
        System.out.println(encode); 
    }
}

Guess you like

Origin blog.csdn.net/qq2942713658/article/details/123289310