springboot高级

https://www.docker-cn.com/community-edition

Visual Studio Code

ctrl+n 搜索类

alt+insert

ctrl+o    重写方法
 
sout  syso

CTRL + 鼠标左击 默认会跳到方法所在的接口
CTRL + ALT + 鼠标左击(B)可以实现跳转至实现类
CTRL + H 可以打开类的继承层级面板。
CTRL + ALT + 鼠标左击(B),同样可以展示 BeanFactory 类的所有继承类的关系。
右键任意类,选择 Diagrams > Show Diagram… 可以打开类的继承图。(Show Parents 和 Show Implementations 菜单。)

也可以使用快捷键 Alt + 7 调出这个面板。Structure  快速类方法
IDEA 中装了一个 Statistic 插件,这个插件只支持 JDK 1.8+。

打开idea –》 Settings -》Plugins,搜索Zoo进行下载安装

下载dcoker(redis、tomcat、mysql、rabbitmq、elasticsearch(版本)、zookeeper)
uname -r
yum install docker
docker -v

systemctl daemon-reload

systemctl restart docker.service

systemctl  start docker

systemctl enable docker   开机启动
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.docker images

docker ps

docker ps -a

下载前加上docker中国镜像 registry.docker-cn.com/library/

下载tomcat(8080)
docker pull tomcat

下载mysql(3306)
docker pull mysql

下载redis(6767)
docker pull redis

下载rabbitmq(5672/15672)
docker pull rabbitmq:3-management

docker run -d -p 5672:5672 -p 15672:15672 --name myrabbitmq rabbitmq:3-management(带Web管理的management)

firewall-cmd --permanent --add-port=15672/tcp
firewall-cmd --permanent --add-port=5672/tcp
firewall-cmd --reload

guest guest

bjtopxin.news
topxin
topxin.news
topxin.emps

访问 http://192.168.10.61:15672

下载elasticsearch(9200、9300)
docker pull elasticsearch:6.5.0
docker run --name es -d -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -p 9200:9200 -p 9300:9300 elasticsearch:6.5.0 
//-e "discovery.type=single-node"

docker logs -f 57d0
报错信息[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

查看max_map_count的值

cat /proc/sys/vm/max_map_count
65530
重新设置max_map_count的值


sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144
再次启动容器

$ docker start 42d6
中文文档  使用postman测试学习
https://www.elastic.co/guide/cn/elasticsearch/guide/current/highlighting-intro.html


下载zookeeper(2181、2888、3888)
dcoker pull zookeeper
docker run --name zk01 -p 2181:2181  --restart always -d zookeeper

一、SpringBoot缓存Cache
    
    JSR-107 api、Spring缓存抽象 、整合redis

    

    Cache接口

    CacheManager接口

    @Cacheable    可缓存的    方法
    @CacheEvict    清空缓存    删除
    @CachePut    更新缓存
    
    @EnableCaching    开启基于注解的缓存

    keyGenerator    缓存数据时key生产策略

·    serialize    缓存数据时value序列化

二、Springboot

    JMS、AMQP、RabbitMQ
    
    JMS
    
        Java api
        Model 2种
    
    AMQP
    
        网络线级协议
    
        RabbitMQ是AMQP实现
        
        支持跨平台、跨语言
    
    
    1、
    2、
        消息代理
    3、
        队列(queue):点对点消息通信(point-to-point)
        主题(topic):发布(publish)、订阅(subscribe)消息通信
    
    异步处理
    

    消息队列
    
    
    流量削峰(秒杀)
    
    
    Spring支持
        
    SpringBoot自动配置

        JmsAutoConfiguration
        RabbiAutoConfiguration
        
RabbitMQ简介

    Message
        
        消息,消息是不具名的,
    
    Publisher
    
        消息生产者,也是一个向交换器发布消息的客户端应用程序
    
    Exchange
        
        交换器
        direct(默认)、fanout、toppic和headers
        
    Queue
    
        消息队列
        
    Binding
    
        绑定,用于消息队列和交换器之间的关联
    
    Connection
    
        网络连接
    
    Channel
        
        信道
        
        复用一条TCP连接
    
    Consumer
    
        消费者
    
    Virtual Host
        
        虚拟主机
        
        必须制定虚拟主机
        RabbitMQ 默认的vhost 是 / .    
        
    Broker(服务器)
    
        消息队列服务器实体
        
RabbitMQ运行机制    
        
    AMQP中的消息路由    
    
    Exchange和Binding
    
    direct(默认)
    
        路由键(routing key)---》binding key 一致
        完全匹配、单播的模式
    
    fanout
    
        所有队列都发,广播、fanout类型转发消息是最快的
    
    toppic
    
        根据规则有选择的广播
        "#"匹配0个或者多个单词 "*"匹配一个单词
    
三、springboot检索

    ElasticSearch
    
        检索功能,
    
        分布式搜索服务,提供Restful API,底层基于Lucene
        
        面向文档    
        
        使用json
        
        索引---》类型---》文档


四、Springboot任务

    异步任务    @EnableAsync启动类    @Async方法
    
    定时任务

    邮件任务
    
        POP3/SMTP服务 (如何使用 Foxmail 等软件收发邮件?)

        IMAP/SMTP服务 (什么是 IMAP,它又是如何设置?)

        获取授权码


五、Springboot与安全

    shiro
    spring Security

    认证(统一身份认证)

    授权(认证成功可以做什么,是否拥有权限)

六、SpringBoot 分布式应用

    Dubbo        RPC远程调用    Container(容器)/Provider(服务提供者)--->Registy(注册中心)--->Consumer(消费者)--->Monitor(监控中心)
    
    zookeeper    注册中心    

    SpringCloud    一站式解决

        Eureka                    服务发现注册中心
        Netfilx Ribbon            客户端负载均衡
        Netfilx Hystrix            断路器
        Netfilx Zuul            服务网管
        Springcloud Config        分布式配置
    
八、Springboot与热部署

    Spring Loaded
    JRebel
    
    Devtools
    ctrl+f9
    
    
九、SpringBoot应用监控

    Actuator

    http://localhost:8080/beans        所有beans的信息
    http://localhost:8080/health        应用健康状况
    http://localhost:8080/auditevents    审计事件信息
    http://localhost:8080/info        当前应用信息

    http://localhost:8080/dump         线程状态信息
    http://localhost:8080/autoconfig     自动配置信息
    http://localhost:8080/trace        追踪信息http
    http://localhost:8080/mappings    当前web应用的请求信息
    http://localhost:8080/metrics        应用的各项指标
    http://localhost:8080/env        应用环境信息
    http://localhost:8080/configprops    配置信息
    http://localhost:8080/shoudown    关闭当前应用
    
    定制端点信息
        
        开启或者关闭
    
    

    


    


        
            
        
    
    
    
    

        

        

        


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值