StandAlone模式下的数据查看 (Derby)
这里我们以windos为例
温馨提示: 连接的时候,需要关闭nacos
我们搞nacos集群的时候,需要改成mysql记得不? 因为derby是每个实例独占的,无法共享数据,所以需要搞个外面的数据库
新增登录用户
nacos提供的默认登录名和密码 nacos /nacos , 页面没有入口可以新增登录用户。
想要加一个,怎么办呢?
引入依赖
<!-- 给密码加密使用 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency>
写个main方法 搞一搞
public class EncrPassword { public static void main(String[] args) { String encode = new BCryptPasswordEncoder().encode("urpassword"); System.out.println(encode); } }
添加后,启动本地的nacos服务,(记得断开derby的连接哈)登录一下
源码
https://github.com/yangshangwei/SpringCloudAlibabMaster