06 2021 档案
SpringSecurity Web 权限方案
摘要:导入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 设置登录系统的账号、密码 方式一:在 a 阅读全文
posted @ 2021-06-30 15:53 upupup-999 阅读(79) 评论(0) 推荐(0) 编辑
2.工厂模式
摘要:看一个具体的需求 看一个披萨的项目:要便于披萨种类的扩展,要便于维护 1) 披萨的种类很多(比如 GreekPizz、CheesePizz 等) 2) 披萨的制作有 prepare,bake, cut, box 3) 完成披萨店订购功能 传统代码就省略了 传统的方式的优缺点 1) 优点是比较好理解, 阅读全文
posted @ 2021-06-30 11:46 upupup-999 阅读(42) 评论(0) 推荐(0) 编辑
读取Nacos配置中心的配置文件
摘要:1、在Nacos创建统一配置文件 (1)点击创建按钮 (2)输入配置信息 a)Data ID 的完整规则格式如下 ${prefix}-${spring.profile.active}.${file-extension} - prefix 默认为所属工程配置spring.application.nam 阅读全文
posted @ 2021-06-29 20:13 upupup-999 阅读(2655) 评论(0) 推荐(0) 编辑
gateway网关服务
摘要:1.导入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> </dependency> < 阅读全文
posted @ 2021-06-29 19:41 upupup-999 阅读(106) 评论(0) 推荐(0) 编辑
XML与Map相互转换工具类
摘要:package com.wang.eduorder.utils; import org.apache.http.Consts; import org.apache.http.HttpEntity; import org.apache.http.NameValuePair; import org.ap 阅读全文
posted @ 2021-06-29 18:06 upupup-999 阅读(159) 评论(0) 推荐(0) 编辑
微信支付官方文档
摘要:https://pay.weixin.qq.com/ 阅读全文
posted @ 2021-06-29 17:10 upupup-999 阅读(131) 评论(0) 推荐(0) 编辑
1.单例模式
摘要:单例设计模式介绍 所谓类的单例设计模式,就是采取一定的方法保证在整个的软件系统中,对某个类 只能存在一个对象实例,并且该类只提供一个取得其对象实例的方法(静态方法)。 比如Hibernate的SessionFactory,它充当数据存储源的代理,并负责创建Session 对象。 SessionFac 阅读全文
posted @ 2021-06-29 12:08 upupup-999 阅读(40) 评论(0) 推荐(0) 编辑
0.数据结构图解
摘要: 阅读全文
posted @ 2021-06-28 16:16 upupup-999 阅读(27) 评论(0) 推荐(0) 编辑
设计模式的七大原则
摘要:设计模式常用的七大原则有: 1) 单一职责原则 2) 接口隔离原则 3) 依赖倒转(倒置)原则 4) 里氏替换原则 5) 开闭原则 6) 迪米特法则 7) 合成复用原则 1.单一职责原则 对类来说的,即一个类应该只负责一项职责。如类A负责两个不同职责:职责1,职责2。 当职责1需求变更而改变A时,可 阅读全文
posted @ 2021-06-28 09:57 upupup-999 阅读(102) 评论(0) 推荐(0) 编辑
类图
摘要:参考链接 (4条消息) UML类图新手入门级介绍_愤怒的小狐狸 博客专栏-CSDN博客 UML类图 - 简书 (jianshu.com) 阅读全文
posted @ 2021-06-27 20:58 upupup-999 阅读(13) 评论(0) 推荐(0) 编辑
10.查找数组中未出现的最小正整数
摘要:1.题目如下 2.解题代码 #include<stdio.h> #include<stdlib.h> int finMissMin(int a[],int n) { int i,*b; b=(int *)malloc(sizeof(int)*n); //初始化为0 for(i=0;i<n;i++) 阅读全文
posted @ 2021-06-27 11:21 upupup-999 阅读(190) 评论(0) 推荐(0) 编辑
9.求整数序列中的主元素
摘要:1.题目如下 2.解题代码 #include<stdio.h> int majority(int a[],int n){ int i,count=1,c=a[0]; for(i=1;i<n;i++) { if(a[i]==c) count++; else { if(count>0) count--; 阅读全文
posted @ 2021-06-27 10:12 upupup-999 阅读(187) 评论(0) 推荐(0) 编辑
项目集成Redis缓存主页数据
摘要:1、在common模块添加依赖 由于redis缓存是公共应用,所以我们把依赖与配置添加到了common模块下面,在common模块pom.xml下添加以下依赖 <!-- redis --> <dependency> <groupId>org.springframework.boot</groupId 阅读全文
posted @ 2021-06-26 15:47 upupup-999 阅读(87) 评论(0) 推荐(0) 编辑
8.数据结构 循环左移算法
摘要:今天学习数据结构与算法发现这个算法还是挺常用的,记录一下嘿嘿 C++代码 #include<stdio.h> //解题思想 由AB得到BA 可以将A逆置,B逆置,再将AB同时逆置 //1 2 3 4 5 6 7 8 //循环左移3次 //4 5 6 7 8 1 2 3 void Reverse(in 阅读全文
posted @ 2021-06-26 10:12 upupup-999 阅读(400) 评论(0) 推荐(0) 编辑
EasyExcel读写操作
摘要:1.导入依赖 <!-- https://mvnrepository.com/artifact/com.alibaba/easyexcel --><dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> 阅读全文
posted @ 2021-06-25 13:39 upupup-999 阅读(109) 评论(0) 推荐(0) 编辑
Logback日志
摘要:1.在配置文件application.properties中设置 logging.level.root=WARN//这种方式只能将日志打印在控制台上 2.安装idea彩色日志插件:grep-console resources 中创建 logback-spring.xml 内容 <?xml versi 阅读全文
posted @ 2021-06-25 09:51 upupup-999 阅读(70) 评论(0) 推荐(0) 编辑
maven静态资源资源导出
摘要:<build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </i 阅读全文
posted @ 2021-06-24 22:23 upupup-999 阅读(39) 评论(0) 推荐(0) 编辑
代码生成器
摘要:1.导入依赖 <!--数据库驱动--><dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId></dependency><!--lombok--><dependency> <groupId> 阅读全文
posted @ 2021-06-24 20:44 upupup-999 阅读(37) 评论(0) 推荐(0) 编辑
Idea创建项目的几种类型
摘要:一 .新建一个javaweb项目(原始方式) 1. 右键新建项目 选择java Enterprise 2.选中右侧的web applicatiion 二.多模块管理 1.最外层新建spring boot项目,删除src目录,加上<packaging>pom</packaging>管理依赖 2.里面新 阅读全文
posted @ 2021-06-24 19:25 upupup-999 阅读(217) 评论(0) 推荐(0) 编辑
Linux笔记
摘要:(3条消息) 狂神说 Linux_DDDDeng_的博客-CSDN博客_狂神linux 阅读全文
posted @ 2021-06-24 09:14 upupup-999 阅读(22) 评论(0) 推荐(0) 编辑
linux目录
摘要:/bin:bin是Binary的缩写, 这个目录存放着最经常使用的命令。/boot: 这里存放的是启动Linux时使用的一些核心文件,包括一些连接文件以及镜像文件。/dev : dev是Device(设备)的缩写, 存放的是Linux的外部设备,在Linux中访问设备的方式和访问文件的方式是相同的。 阅读全文
posted @ 2021-06-24 09:13 upupup-999 阅读(36) 评论(0) 推荐(0) 编辑
Maven打包springboot项目并且运行
摘要:1.进入项目控制台,输入命令行进行打包 mvn clean package 2.进入jar包位置(项目的target下)输入jar包名称 java -jar securitydemo1-0.0.1-SNAPSHOT.jar 阅读全文
posted @ 2021-06-24 08:42 upupup-999 阅读(101) 评论(0) 推荐(0) 编辑
Nacos配置中心
摘要:一新建 Nacos配置中心 1.新建配置 a)Data ID 的完整规则格式如下 ${prefix}-${spring.profile.active}.${file-extension} - prefix 默认为所属工程配置spring.application.name 的值(即:nacos-pro 阅读全文
posted @ 2021-06-23 17:45 upupup-999 阅读(221) 评论(0) 推荐(0) 编辑
springsecurity使用流程
摘要:1.查用户权限 2.放到redis 3.根据token返回用户信息 4.token放到cookie,请求头里放token 5.在请求头拿到token,解析得到用户信息,去redis拿到该用户对应权限 阅读全文
posted @ 2021-06-23 12:29 upupup-999 阅读(139) 评论(0) 推荐(0) 编辑
Java全栈开发指南
摘要:https://www.pdai.tech/md/java/thread/java-thread-x-juc-overview.html 阅读全文
posted @ 2021-06-23 10:53 upupup-999 阅读(42) 评论(0) 推荐(0) 编辑
统一跨域配置
摘要:import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.Cor 阅读全文
posted @ 2021-06-22 15:24 upupup-999 阅读(52) 评论(0) 推荐(0) 编辑
网关gateway使用流程
摘要:1.导入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId></dependency>2.配置文件注册进nacos # na 阅读全文
posted @ 2021-06-22 14:48 upupup-999 阅读(212) 评论(0) 推荐(0) 编辑
获取当天日期以及前几天日期工具类
摘要:import org.slf4j.Logger;import org.slf4j.LoggerFactory;import java.text.DateFormat;import java.text.ParseException;import java.text.SimpleDateFormat;i 阅读全文
posted @ 2021-06-21 16:12 upupup-999 阅读(194) 评论(0) 推荐(0) 编辑
定时任务
摘要:在线Cron表达式生成器 (qqe2.com) 1.在主启动类上添加注解 @EnableScheduling 2.创建定时任务类,使用cron表达式 /** * 测试 * 每天七点到二十三点每五秒执行一次 */ @Scheduled(cron = "0/5 * * * * ?") public vo 阅读全文
posted @ 2021-06-21 16:00 upupup-999 阅读(43) 评论(0) 推荐(0) 编辑
7.带头节点的双向链表
摘要:#include<stdio.h>#include<stdlib.h>typedef int ElemType;typedef struct DNode{ ElemType data; struct DNode *prior,*next; }DNode,*DLinkList; //初始化链表 boo 阅读全文
posted @ 2021-06-17 15:02 upupup-999 阅读(73) 评论(0) 推荐(0) 编辑
6.带头结点的单链表操作
摘要:#include<stdio.h>#include<stdlib.h>typedef int ElemType; typedef struct LNode{ ElemType data; struct LNode *next; }LNode,*LinkList;LNode * GetElem(Lin 阅读全文
posted @ 2021-06-15 21:47 upupup-999 阅读(100) 评论(0) 推荐(0) 编辑
javaweb操作数据库工具类
摘要:package com.wang.dao;import java.io.IOException;import java.io.InputStream;import java.sql.*;import java.util.Properties;public class BaseDao { privat 阅读全文
posted @ 2021-06-15 12:15 upupup-999 阅读(105) 评论(0) 推荐(0) 编辑
5.顺序表的按位和按值查找
摘要:#include <stdio.h>#include <stdlib.h>#define InitSize 10 typedef int ElemType;typedef struct{ int *data; int MaxSize; int length;}SqList; void InitLis 阅读全文
posted @ 2021-06-14 21:08 upupup-999 阅读(315) 评论(0) 推荐(0) 编辑
4.顺序表的删除
摘要:#include <stdio.h>#define MaxSize 10typedef int ElemType;typedef struct{ int data[10]; int length;}SqList; void InitList(SqList &L){ for(int i=0;i<Max 阅读全文
posted @ 2021-06-14 20:04 upupup-999 阅读(58) 评论(0) 推荐(0) 编辑
3.顺序表的插入
摘要:#include <stdio.h>#define MaxSize 10typedef int ElemType;typedef struct{ int data[10]; int length;}SqList; void InitList(SqList &L){ for(int i=0;i<Max 阅读全文
posted @ 2021-06-14 18:36 upupup-999 阅读(252) 评论(0) 推荐(0) 编辑
2.顺序表的定义(动态)
摘要:#include <stdio.h>#include <stdlib.h>#define InitSize 10 typedef int ElemType;typedef struct{ int *data; int MaxSize; int length;}SqList; void InitLis 阅读全文
posted @ 2021-06-14 17:36 upupup-999 阅读(60) 评论(0) 推荐(0) 编辑
1.顺序表的定义
摘要:#include <stdio.h>#define MaxSize 10typedef int ElemType;typedef struct{ int data[10]; int length;}SqList; void InitList(SqList &L){ for(int i=0;i<Max 阅读全文
posted @ 2021-06-14 17:35 upupup-999 阅读(63) 评论(0) 推荐(0) 编辑
生成微信支付二维码接口
摘要:1.准备微信支付需要材料 weixin: pay: #关联的公众号appid appid: wx74862e0dfcf69954 #商户号 partner: 1558950191 #商户key partnerkey: T6m9iK73b0kn9g5v426MKfHQH7X8rKwb #回调地址 no 阅读全文
posted @ 2021-06-11 16:15 upupup-999 阅读(990) 评论(0) 推荐(0) 编辑
订单号工具类
摘要:生成订单号工具类 import java.text.SimpleDateFormat; import java.util.Date; import java.util.Random; /** * 订单号工具类 * * @author qy * @since 1.0 */ public class O 阅读全文
posted @ 2021-06-11 14:44 upupup-999 阅读(53) 评论(0) 推荐(0) 编辑
返回值工具类
摘要:1.常量值public interface ResultCode { public static Integer SUCCESS = 20000; public static Integer ERROR = 20001;}2.返回值类 import io.swagger.annotations.Ap 阅读全文
posted @ 2021-06-11 14:40 upupup-999 阅读(92) 评论(0) 推荐(0) 编辑
根据凭证播放阿里云视频测试
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-06-10 13:53 upupup-999 阅读(221) 评论(0) 推荐(0) 编辑
阿里云视频播放器测试
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-06-10 13:35 upupup-999 阅读(267) 评论(0) 推荐(0) 编辑
vue富文本编辑器不能正常显示解决办法
摘要:今天做vue数据回显时发现富文本编辑器生成的标签不能正常显示 解决办法 在需要显示的标签中加入v-html <p v-html="courseWebVo.description"> {{courseWebVo.description}} </p> 阅读全文
posted @ 2021-06-10 12:11 upupup-999 阅读(1148) 评论(0) 推荐(0) 编辑
vue界面显示登录之后的用户信息
摘要:具体流程 准备工作 安装js-cookie插件把用户信息放进cookie npm install js-cookie 引入cookie import cookie from 'js-cookie' 代码实现 //登录的方法 submitLogin() { //第一步 调用接口进行登录,返回token 阅读全文
posted @ 2021-06-08 13:34 upupup-999 阅读(1648) 评论(0) 推荐(0) 编辑
MD5加密
摘要:import java.security.MessageDigest;import java.security.NoSuchAlgorithmException; public final class MD5 { public static String encrypt(String strSrc) 阅读全文
posted @ 2021-06-07 19:03 upupup-999 阅读(41) 评论(0) 推荐(0) 编辑
JWT工具类
摘要:1.导入依赖 <!-- JWT--> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> </dependency> 2.工具类 import io.jsonwebtoken.Claims; im 阅读全文
posted @ 2021-06-07 19:02 upupup-999 阅读(97) 评论(0) 推荐(0) 编辑
阿里云短信验证加redis限制验证码过期时间
摘要:1.导入依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId></dependency><dependency> <groupId>com.aliyun</groupId> <artifactI 阅读全文
posted @ 2021-06-07 17:05 upupup-999 阅读(283) 评论(0) 推荐(0) 编辑
Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException:解决方法
摘要:1.在自己的服务器中找到redis的配置文件 redis.conf 使用命令vi redis.conf或vim redis.conf 1.注释掉127.0.0.1 原因:bind 127.0.0.1生效,只能本机访问redis 2.将 protected-mode yes 改为:protected- 阅读全文
posted @ 2021-06-07 11:23 upupup-999 阅读(22797) 评论(0) 推荐(0) 编辑
springcloud集成redis缓存流程
摘要:1.导入项目需要的依赖 <!-- redis --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId></dependency 阅读全文
posted @ 2021-06-07 11:20 upupup-999 阅读(319) 评论(0) 推荐(0) 编辑
redis缓存数据使用遇到的问题
摘要:1.项目启动报错 io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required. 2.通过大概意思可以看出是redis设置了密码,需要密码配置 在springboot的redis配置文件中加入密码验证 s 阅读全文
posted @ 2021-06-07 11:04 upupup-999 阅读(178) 评论(0) 推荐(0) 编辑
vue封装axios
摘要:安装axios npm install axios 封装 import axios from 'axios' // 创建axios实例 const service = axios.create({ baseURL: 'http://localhost:9001', // api的base_url t 阅读全文
posted @ 2021-06-04 14:57 upupup-999 阅读(30) 评论(0) 推荐(0) 编辑
NUXT环境初始化时报错问题
摘要:将template下的文档复制到工作区 修改package.json 修改nuxt.config.js 报错 npm ERR! path E:\projects\springboot\wang_front\starter-template-master\node_modules\utf-8-vali 阅读全文
posted @ 2021-06-03 22:01 upupup-999 阅读(635) 评论(0) 推荐(0) 编辑
mysql连接数据库
摘要:spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/mybatis_plus?serverTimezone=GMT%2B8sprin 阅读全文
posted @ 2021-06-03 19:50 upupup-999 阅读(43) 评论(0) 推荐(0) 编辑
Feign实现服务调用
摘要:Feign实现服务调用 在模块添加pom依赖 <!--服务调用--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> < 阅读全文
posted @ 2021-06-03 16:48 upupup-999 阅读(82) 评论(0) 推荐(0) 编辑
Nacos实现服务注册
摘要:下载地址和版本 下载地址:https://github.com/alibaba/nacos/releases 下载版本:nacos-server-1.1.4.tar.gz或nacos-server-1.1.4.zip,解压任意目录即可 启动nacos服务 一定要切换到管理员权限 切换到安装目录的bi 阅读全文
posted @ 2021-06-03 16:35 upupup-999 阅读(67) 评论(0) 推荐(0) 编辑
sprigCloud使用hystrix技术服务降级
摘要:pom中添加依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> <version>1.4.6.RELEASE</versi 阅读全文
posted @ 2021-06-03 16:22 upupup-999 阅读(34) 评论(0) 推荐(0) 编辑




点击右上角即可分享
微信分享提示