上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: 一,添加pom依赖 <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring-boot-web-starter</artifactId> <version>1.4.0</version> </dependenc 阅读全文
posted @ 2020-02-10 13:59 王东波 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 一,添加pom依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 二,添加配置类 1,登录验证 阅读全文
posted @ 2020-02-07 18:34 王东波 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 1,idea选择创建一个maven项目 2,pom.xml <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> 阅读全文
posted @ 2020-02-01 22:41 王东波 阅读(687) 评论(0) 推荐(0) 编辑
摘要: 1,下载安装包,解压,执行以下命令启动服务。 nexus.exe /run 2,访问http://localhost:8081访问管理界面,添加一个maver2(proxy)的仓库,代理地址填写阿里云的加速地址:http://maven.aliyun.com/nexus/content/groups 阅读全文
posted @ 2020-02-01 22:25 王东波 阅读(226) 评论(0) 推荐(0) 编辑
摘要: package命令完成了项目编译、单元测试、打包功能,但没有把打好的可执行jar包(war包或其它形式的包)布署到本地maven仓库和远程maven私服仓库 install命令完成了项目编译、单元测试、打包功能,同时把打好的可执行jar包(war包或其它形式的包)布署到本地maven仓库,但没有布署 阅读全文
posted @ 2020-02-01 21:21 王东波 阅读(132) 评论(0) 推荐(0) 编辑
摘要: <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> <id> 阅读全文
posted @ 2020-01-31 15:44 王东波 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1,对于404,500这类错误,可以直接新建public/error目录 ,在error目录 中新建404.html, 500.html或5xx.html,springboot会自动跳转到这些静态页面。 2,如果想记录错误信息,可以通过专门的类来处理。通过@ControllerAdvice注解 @C 阅读全文
posted @ 2020-01-29 17:44 王东波 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 说明: sentinel可以作为各微服务的限流,也可以作为gateway网关的限流组件。 spring cloud gateway有限流功能,但此处用sentinel来作为替待。 说明:sentinel流控可以放在gateway网关端,也可以放在各微服务端。 1,以父工程为基础,创建子工程 2,添加 阅读全文
posted @ 2020-01-21 20:37 王东波 阅读(1880) 评论(0) 推荐(0) 编辑
摘要: 1, 基于父工程,新建一个模块 2,pom文件添加依赖 <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifac 阅读全文
posted @ 2020-01-21 18:09 王东波 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 背景说明:生产环境中sentinel的使用应该是如下图所示: sentinel控制台编辑规则 推送到 nacos配置中心, 由nacos推送到应用,应用更新内存。 这样的话, 规则持久化在了nacos中,应用重启后,nacos会自动推送给应用,所以规则会一直生效。 1,给应用添加依赖 <depend 阅读全文
posted @ 2020-01-19 11:02 王东波 阅读(2377) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页