
spring cloud
Time''
111
展开
-
@NotBlank@NotNull注解不生效对List<Bean>的Bean无效解决方案
需要在controller,和接口上同时添加注解,点击跳转到文档原创 2021-11-11 16:58:47 · 2106 阅读 · 0 评论 -
2021-01-26-SpringSecurity-OAUTH2-密码模式获取token(未使用feign版)
1.架构体系2.源码包(见资源)3.资源微服务配置类package cn.x.x.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.security.config.annotation.method.configuration.EnableGlobalMe原创 2021-01-26 20:28:57 · 667 阅读 · 0 评论 -
Spring cloud 入门
一. Spring cloud概述1. 是什么Spring cloud是一个基于Spring Boot实现的服务治理工具包,用于微服务架构中管理和协调服务的。2. 组成部分五大神兽:服务注册发现(注册中心)——Netflix Eureka : 帮我们管理服务的通信地址(ip,端口)客服端负载均衡——Netflix Ribbon\Feign : 解决服务的调用的断路器——Netflix Hystrix :解决微服务故障的,保护微服务的服务网关——Netflix Zuul :统一访问入口,微服原创 2021-01-16 16:43:14 · 137 阅读 · 1 评论 -
添加到网关ZUUL中的步骤
1.模块添加依赖 <!-- Eureka 客户端依赖(注册中心) --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency原创 2021-01-16 15:43:42 · 257 阅读 · 2 评论 -
java自关联id与pid - 循环递归查询子菜单或者下拉框的实现
1.service实现类代码courseTypes = baseMapper.selectForTreeData();2.mapper层//第1条:根据pid=0或pid=xxx查询出第1级课程分类列表 List<CourseType> selectForTreeData();3.mapper.xml代码<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-//mybatis.or原创 2021-01-15 11:58:26 · 1098 阅读 · 0 评论