vscode 搭建web工程_Dubbo 分布式架构搭建教育 PC 站

44df072f1fcfa0d6ea1a71f1e9191c26.png

架构设计与环境搭建

项目架构

项目介绍

教育 PC 站是提供给学员观看技术视频的网站。

学员使用手机号注册登录后,可以选择适合自己的课程,并观看课程视频,当然,有免费的课程,也有 VIP 专属课程。

技术选型

前端技术选型
  • Vue.js - 是一套用于构建用户界面的渐进式 JavaScript 框架

  • ElementUI 库 - 是饿了么前端出品的基于 Vue.js 的后台组件库,方便程序员进行页面快速布局和构建

  • node.js - 简单的说 Node.js 就是运行在服务端的 JavaScript 运行环境

  • Axios - 对 Ajax 的封装, 简单来说就是 Ajax 技术实现了局部数据的刷新,AXIOS 实现了对 Ajax 的封装

后端技术选型
  • Web 层借助 SpringMVC 接收请求,进行视图跳转

  • Service 层借助 Spring 进行 IOC、AOP、及事务管理

  • Dao 层 借助 MyBatis 进行数据库交互

  • EasyCode 插件 IDEA 快速生成实体类的插件

  • Zookeeper 服务注册与服务发现

  • Dubbo 分布式框架,远程 RPC 调用

  • Redis 内存数据库,缓存

  • Lombok 消除实体类中冗余的 get 和 set

  • SpringSocial 简单理解就是和第三方应用打交道,微信登录用

项目开发环境

开发工具

  • 后端 - IDEA 2019

  • 前端 - VS code

  • 数据库客户端工具 - SQLYog

开发环境

  • JDK 11

  • Maven 3.6.3

  • MySQL 5.7

  • Zookeeper 3.6.0

  • Dubbo 2.5.7

  • Redis 5.0.4

开发后端服务接口

采用前后端分离的开发模式,先开发后端服务接口,测试成功,再开发前端 Vue.js 界面,最后进行前后端联调,项目上线。

项目结构与命名

单一架构:

tomcat-[view -> controller -> service -> dao -> mySQL]

分布式架构:

tomcat-[view:PC] --> tomcat-[controller]
tomcat-[view:phone] --> tomcat-[controller]

tomcat-[controller] --> tomcat-[service->redis->dao->MySQL]

后端项目架构,采用 Dubbo 的生产者和消费者的理论,创建服务提供方和服务消费方两个工程,通过 Maven 聚合工程来搭建,模块划分如下:

----------------------------------------------
> 服务提供 <
lagou-edu-parent - pom 聚合父工程,统一依赖设置
lagou-edu-entity - jar 工程,封装实体类
lagou-edu-dao - jar 工程,封装与数据库打交道的部分
lagou-edu-service - web 工程,暴露服务的接口和实现

----------------------------------------------

> 服务消费 <
lagou-edu-web - web 工程,接收前端工程发来的请求,远程调用服务并消费
----------------------------------------------
URL 命名
  • 查询(get 开头):http://localhost:8002/course/getList

  • 保存(save 开头):http://localhost:8002/course/saveXx

  • 更新(update 开头):http://localhost:8002/course/updateXx

接口响应格式
/**
 * Data Transfer Object
 * 数据传输对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class ResponseDTO<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    // 操作状态
    private int state;  
    // 状态描述
    private String message;  
    // 相应内容
    private T content;
    ...
}
初始化数据库

参考数据库设计文档

服务提供方项目搭建
父模块 `lagou-edu-parent`

POM 聚合父工程,统一依赖设置

pom.xml

<?xml  version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0modelVersion>

    <groupId>com.rendagroupId>
    <artifactId>lagou-edu-parentartifactId>
    <version>1.0-SNAPSHOTversion>
    <modules>
        <module>lagou-edu-entitymodule>
        <module>lagou-edu-daomodule>
        <module>lagou-edu-servicemodule>
    modules>

    <packaging>pompackaging>

    
    <properties>
        <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
        <maven.compiler.encoding>UTF-8maven.compiler.encoding>
        <java.version>1.11java.version>
        <maven.compiler.source>11maven.compiler.source>
        <maven.compiler.target>11maven.compiler.target>
        <spring.version>5.0.6.RELEASEspring.version>
    properties>

    <dependencies>
        
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-contextartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-beansartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-webmvcartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-jdbcartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-aspectsartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-testartifactId>
            <version>${spring.version}version>
            <scope>testscope>
        dependency>
        
        <dependency>
            <groupId>org.mybatisgroupId>
            <artifactId>mybatisartifactId>
            <version>3.2.8version>
        dependency>
        <dependency>
            <groupId>org.mybatisgroupId>
            <artifactId>mybatis-springartifactId>
            <version>1.3.2version>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>druidartifactId>
            <version>1.0.9version>
        dependency>
        
        <dependency>
            <groupId>mysqlgroupId>
            <artifactId>mysql-connector-javaartifactId>
            <version>5.1.32version>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>dubboartifactId>
            <version>2.5.7version>
        dependency>
        
        <dependency>
            <groupId>org.apache.zookeepergroupId>
            <artifactId>zookeeperartifactId>
            <version>3.4.6version>
        dependency>
        
        <dependency>
            <groupId>com.github.sgroschupfgroupId>
            <artifactId>zkclientartifactId>
            <version>0.1version>
        dependency>
        <dependency>
            <groupId>javassistgroupId>
            <artifactId>javassistartifactId>
            <version>3.11.0.GAversion>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>fastjsonartifactId>
            <version>1.2.47version>
        dependency>
        
        <dependency>
            <groupId>junitgroupId>
            <artifactId>junitartifactId>
            <version>4.12version>
            <scope>testscope>
        dependency>
        
        <dependency>
            <groupId>org.springframework.datagroupId>
            <artifactId>spring-data-redisartifactId>
            <version>2.3.2.RELEASEversion>
        dependency>
        
        <dependency>
            <groupId>redis.clientsgroupId>
            <artifactId>jedisartifactId>
            <version>3.1.0version>
        dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.coregroupId>
            <artifactId>jackson-databindartifactId>
            <version>2.9.8version>
        dependency>
    dependencies>

project>
子模块 `lagou-edu-entity`

Jar 工程,封装实体类

pom.xml

<?xml  version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>lagou-edu-parentartifactId>
        <groupId>com.rendagroupId>
        <version>1.0-SNAPSHOTversion>
    parent>
    <modelVersion>4.0.0modelVersion>

    <artifactId>lagou-edu-entityartifactId>

    <dependencies>
        
        <dependency>
            <groupId>org.projectlombokgroupId>
            <artifactId>lombokartifactId>
            <version>1.18.12version>
            <scope>providedscope>
        dependency>
    dependencies>

project>
子模块 `lagou-edu-dao`

Jar 工程,封装与数据库打交道的部分,依赖于 lagou-edu-entity

pom.xml

<?xml  version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>lagou-edu-parentartifactId>
        <groupId>com.rendagroupId>
        <version>1.0-SNAPSHOTversion>
    parent>
    <modelVersion>4.0.0modelVersion>

    <artifactId>lagou-edu-daoartifactId>

    <dependencies>
        <dependency>
            <groupId>com.rendagroupId>
            <artifactId>lagou-edu-entityartifactId>
            <version>1.0-SNAPSHOTversion>
        dependency>
    dependencies>

project>
子模块 `lagou-edu-service`

Web 工程,暴露服务的接口和实现,依赖于 lagou-edu-dao

pom.xml

<?xml  version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>lagou-edu-parentartifactId>
        <groupId>com.rendagroupId>
        <version>1.0-SNAPSHOTversion>
    parent>
    <modelVersion>4.0.0modelVersion>

    <artifactId>lagou-edu-serviceartifactId>

    <packaging>warpackaging>

    <dependencies>
        <dependency>
            <groupId>com.rendagroupId>
            <artifactId>lagou-edu-daoartifactId>
            <version>1.0-SNAPSHOTversion>
        dependency>
    dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.mavengroupId>
                <artifactId>tomcat7-maven-pluginartifactId>
                <configuration>
                    <port>8001port>
                    <path>/path>
                configuration>
                <executions>
                    <execution>
                        
                        <phase>packagephase>
                        <goals>
                            <goal>rungoal>
                        goals>
                    execution>
                executions>
            plugin>
        plugins>
    build>

project>
服务消费方项目搭建
`lagou-edu-web`

Web 工程,消费服务,依赖于 lagou-edu-entity

pom.xml

<?xml  version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0modelVersion>

    <groupId>com.rendagroupId>
    <artifactId>lagou-edu-webartifactId>
    <version>1.0-SNAPSHOTversion>

    <packaging>warpackaging>

    
    <properties>
        <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
        <maven.compiler.encoding>UTF-8maven.compiler.encoding>
        <java.version>1.11java.version>
        <maven.compiler.source>11maven.compiler.source>
        <maven.compiler.target>11maven.compiler.target>
        <spring.version>5.0.6.RELEASEspring.version>
    properties>

    <dependencies>
        <dependency>
            <groupId>com.rendagroupId>
            <artifactId>lagou-edu-entityartifactId>
            <version>1.0-SNAPSHOTversion>
        dependency>
        
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-contextartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-beansartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-webmvcartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-jdbcartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-aspectsartifactId>
            <version>${spring.version}version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-testartifactId>
            <version>${spring.version}version>
            <scope>testscope>
        dependency>
        
        <dependency>
            <groupId>org.mybatisgroupId>
            <artifactId>mybatisartifactId>
            <version>3.2.8version>
        dependency>
        <dependency>
            <groupId>org.mybatisgroupId>
            <artifactId>mybatis-springartifactId>
            <version>1.3.2version>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>druidartifactId>
            <version>1.0.9version>
        dependency>
        
        <dependency>
            <groupId>mysqlgroupId>
            <artifactId>mysql-connector-javaartifactId>
            <version>5.1.32version>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>dubboartifactId>
            <version>2.5.7version>
        dependency>
        
        <dependency>
            <groupId>org.apache.zookeepergroupId>
            <artifactId>zookeeperartifactId>
            <version>3.4.6version>
        dependency>
        
        <dependency>
            <groupId>com.github.sgroschupfgroupId>
            <artifactId>zkclientartifactId>
            <version>0.1version>
        dependency>
        <dependency>
            <groupId>javassistgroupId>
            <artifactId>javassistartifactId>
            <version>3.11.0.GAversion>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>fastjsonartifactId>
            <version>1.2.47version>
        dependency>
        
        <dependency>
            <groupId>junitgroupId>
            <artifactId>junitartifactId>
            <version>4.12version>
            <scope>testscope>
        dependency>
        
        <dependency>
            <groupId>org.springframework.datagroupId>
            <artifactId>spring-data-redisartifactId>
            <version>2.3.2.RELEASEversion>
        dependency>
        
        <dependency>
            <groupId>redis.clientsgroupId>
            <artifactId>jedisartifactId>
            <version>3.1.0version>
        dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.coregroupId>
            <artifactId>jackson-databindartifactId>
            <version>2.9.8version>
        dependency>
        <dependency>
            <groupId>com.thetransactioncompanygroupId>
            <artifactId>cors-filterartifactId>
            <version>2.5version>
        dependency>
        
        <dependency>
            <groupId>javax.servletgroupId>
            <artifactId>servlet-apiartifactId>
            <version>2.4version>
            <scope>providedscope>
        dependency>
        
        <dependency>
            <groupId>org.apache.httpcomponentsgroupId>
            <artifactId>httpclientartifactId>
            <version>4.5.12version>
        dependency>
        <dependency>
            <groupId>com.github.wxpaygroupId>
            <artifactId>wxpay-sdkartifactId>
            <version>0.0.3version>
        dependency>
        <dependency>
            <groupId>com.jfinalgroupId>
            <artifactId>jfinalartifactId>
            <version>3.5version>
        dependency>
        
        <dependency>
            <groupId>com.thetransactioncompanygroupId>
            <artifactId>cors-filterartifactId>
            <version>2.5version>
        dependency>
    dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.mavengroupId>
                <artifactId>tomcat7-maven-pluginartifactId>
                <configuration>
                    <port>8002port>
                    <path>/path>
                configuration>
                <executions>
                    <execution>
                        
                        <phase>packagephase>
                        <goals>
                            <goal>rungoal>
                        goals>
                    execution>
                executions>
            plugin>
        plugins>
    build>

project>

src\main\webapp\WEB-INF\web.xml

<?xml  version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://xmlns.jcp.org/xml/ns/javaee"xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"id="WebApp_ID" version="3.1">
    
    <filter>
        <filter-name>charsetfilter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilterfilter-class>
        <init-param>
            <param-name>encodingparam-name>
            <param-value>utf-8param-value>
        init-param>
        <init-param>
            <param-name>forceEncodingparam-name>
            <param-value>trueparam-value>
        init-param>
    filter>
    <filter-mapping>
        <filter-name>charsetfilter-name>
        <url-pattern>/*url-pattern>
    filter-mapping>

    
    <filter>
        <filter-name>corsFitlerfilter-name>
        <filter-class>com.thetransactioncompany.cors.CORSFilterfilter-class>
    filter>
    <filter-mapping>
        <filter-name>corsFitlerfilter-name>
        <url-pattern>/*url-pattern>
    filter-mapping>

    <servlet>
        <servlet-name>springMVCservlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServletservlet-class>
        <init-param>
            <param-name>contextConfigLocationparam-name>
            <param-value>classpath:spring/spring-consumer.xmlparam-value>
        init-param>
    servlet>
    <servlet-mapping>
        <servlet-name>springMVCservlet-name>
        <url-pattern>/url-pattern>
    servlet-mapping>
web-app>

src\main\resources\spring\spring-consumer.xml

<?xml  version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/mvc
       http://www.springframework.org/schema/mvc/spring-mvc.xsd
       http://code.alibabatech.com/schema/dubbo
       http://code.alibabatech.com/schema/dubbo/dubbo.xsd">

    
    <mvc:annotation-driven>
        <mvc:message-converters register-defaults="true">
            <bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
                <property name="supportedMediaTypes" value="application/json"/>
                <property name="features">
                    <array>
                        <value>WriteMapNullValuevalue>
                        <value>WriteDateUseDateFormatvalue>
                    array>
                property>
            bean>
        mvc:message-converters>
    mvc:annotation-driven>

    
    <dubbo:application name="lagou-edu-web"/>

    
    <dubbo:registry address="zookeeper://192.168.186.128:2181"/>

    
    <dubbo:annotation package="com.renda"/>

beans>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/421672.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

jdk 环境变量_Windows下jdk下载安装与环境变量配置

下载安装jdk百度搜索jdk版本&#xff0c;以1.8版本为例&#xff0c;百度搜索“jdk1.8”&#xff0c;一般是第一个。百度搜索jdk1.8打开jdk下载页面&#xff0c;这里我们下载jdk1.8 x64版本下载地址&#xff1a;jdk1.8下载地址jdk1.8下载页面下载历史版本的jdk自动跳转登录&…

js true false 转0 1_「0-1岁」早产儿何时一段转二段奶粉

早产儿指的是37周之前出生的宝宝&#xff0c;想必足月宝宝来说&#xff0c;早产宝宝各方面发育都不完善&#xff0c;所以家长在照顾的时候要格外细心。当早产儿出生后&#xff0c;应当先喝早产儿奶粉&#xff0c;等身体发育发育到一定程度时&#xff0c;才更换奶粉。那么早产儿…

邮件服务器方案参考

国内私募机构九鼎控股打造APP&#xff0c;来就送 20元现金领取地址&#xff1a;http://jdb.jiudingcapital.com/phone.html内部邀请码&#xff1a;C8E245J &#xff08;不写邀请码&#xff0c;没有现金送&#xff09;国内私募机构九鼎控股打造&#xff0c;九鼎投资是在全国股份…

记录一下,踩得奇奇怪怪的坑

1servlet虚拟路径访问不到(默认的可以访问) url后的路径设置时与项目的名称一致 url必须与这个一致 2.jdbc连接数据库&#xff0c;本地测试无问题&#xff0c;一用tomcat发包就出错&#xff0c;导致连接不上时&#xff0c;看看你得配置文件的位置是否有误 放到resources目录下…

归并排序算法(C#实现)

归并排序(Merge Sort)是利用"归并"技术来进行排序。归并是指将若干个已排序的子文件合并成一个有序的文件。归并排序有两种方式&#xff1a;1): 自底向上的方法 2):自顶向下的方法 1、 自底向上的方法&#xff08;1&#xff09; 自底向上的基本思想 自底向上的基…

m5310采用芯片 中移物联_芯链HPB引领硬件区块链加密芯片技术,有望在谷歌光芯之前突破...

伴随人工智能时代的开启&#xff0c;世界对于高性能计算机器的需求磅礴发展&#xff1b;以往的高性能计算芯片是基于CMOS数字电路的处理器&#xff0c;而伴随着电子元件的摩尔定律接近技术瓶颈&#xff0c;数字电路芯片的发展速度和发展基础都在缓慢进行&#xff1b;区块链技术…

计算机的硬件工作原理(图片部分资源摘自王道考研资料)

一、现代计算机的组成 此处主存和辅存可以理解为&#xff0c;内存和外存&#xff0c;内存的特点是读取速度快但是不利于保存大量数据&#xff0c;外存的特点 是读取速度慢&#xff0c;但是可以存储大量数据 计算机在开机时不会读取硬盘上的所有数据&#xff0c;开机时先读取的…

rstp协议和stp协议对比_3.TCP和UDP协议对比

TCP、UDP协议对比任务&#xff1a;掌握TCP协议、UDP协议的作用&#xff1b;TCP的三次握手和四次挥手&#xff1b;RST断开连接过程和作用。1.TCPTCP(Transmission Control Protocol 传输控制协议)是一种面向连接的、可靠的、基于字节流的传输层通信协议&#xff0c;由IETF的RFC …

计算机组成原理-数据的表示和运算(图片资源摘自王道考研资料)

一、进位计数制 二、BCD码 此处&#xff1a; 58 0101 1000 1101 超出数据能表达的范围&#xff0c;因为 8421码只能表示0-9 十以上数据视为无效数据&#xff0c;因此在此基础上加六&#xff0c;进行校正--> 11010110 0001 0011 ----拆成两个看

lacp可以在access接口吗_现网必用的链路冗余技术,静态LACP链路捆绑,两分钟快速掌握...

一、链路聚合链路聚合(Link Aggregation)是将—组物理接口捆绑在一起作为一个逻辑接口来增加带宽的一种方法&#xff0c;又称为多接口负载均衡组(Load Sharing Group)或链路聚合组(Link Aggregation Group)1、配置手工负载分担模式链路聚合手工负载分担模式下&#xff0c;Eth-T…

Spring 集成web环境

Spring 集成web环境 一、配置ContextLoaderListener 监听器 1.maven坐标 org.springframework spring-web 5.3.14 2.web.xml <context-param><param-name>contextConfigLocation</param-name><param-value>classpath:applicationContext.xml</para…

一只青蛙跳向三个台阶_8. 跳台阶

一只青蛙一次可以跳上1级台阶&#xff0c;也可以跳上2级。求该青蛙跳上一个n级的台阶总共有多少种跳法。1. 思路&#xff1a;若只有一级台阶&#xff1a;一种跳法两级台阶&#xff1a;两种跳法(11 / 2)三级台阶&#xff1a;三种跳法(111 / 12 / 21)四级台阶&#xff1a;五种跳法…

spring 框架(一)

目录 一、spring简介 二、spring入门 三、spring配置文件 3.1.bean标签的基本配置(applicationContext.xml) 3.2Bean&#xff08;scope:指对象的作用范围&#xff09;标签范围配置 3.3 Bean生命周期配置 3.4 Bean实例化三种方式 3.5 Bean的依赖注入入门 3.6 Bean的依赖…

cdr添加节点快捷键_CDR快捷键分享,需要的赶紧收藏!

点击上方蓝字&#xff0c;关注我们哦&#xff01;&#xff01;有粉丝在后台留言说&#xff0c;希望我分享一下CDR的快捷键&#xff0c;今天我整理了一下快捷键。来源&#xff1a;内容整理自网络&#xff0c;仅供学习交流一工具箱I 绘制曲线&#xff0c;并对笔划使用预置、画刷、…

spring 框架(二)

目录 一、Spring配置数据源 1.1 数据源(连接池)的作用 1.2数据源的使用 1.3基本实现 1.4.抽取配置文件&#xff0c;降低耦合性(druid) 1.4.1抽取jdbc.properties文件 1.4.2设置数据源的基本连接数据&#xff0c;通过applicationContext.xml设置数据库参数applicationCon…

matplotlib 对称图_Python 绘图,我只用 Matplotlib

散点图散点图显示两组数据的值&#xff0c;如图1-1所示。每个点的坐标位置由变量的值决定&#xff0c;并由一组不连接的点完成&#xff0c;用于观察两种变量的相关性。例如&#xff0c;身高—体重、温度—维度。图1-1 散点图示例使用Matplotlib的scatter()函数绘制散点图&#…