SpringBoot2基础入门

news2024/10/6 10:40:35

SpringBoot2基础入门

  • 学习要求
  • 环境要求
  • 学习资料
  • 01、Spring与SpringBoot
    • 1、Spring能做什么
      • 1.1、Spring的能力
      • 1.2、Spring的生态
      • 1.3、Spring5重大升级
        • 1.3.1、响应式编程
        • 1.3.2、内部源码设计
    • 2、为什么用SpringBoot
      • 2.1、SpringBoot优点
      • 2.2、SpringBoot缺点
    • 3、时代背景
      • 3.1、微服务
      • 3.2、分布式
      • 3.3、云原生
    • 4、如何学习SpringBoot
        • https://github.com/spring-projects/spring-boot/wiki#release-notes
  • 02、SpringBoot2入门
    • 1、系统要求
      • 1.1 maven设置
    • 2、HelloWorld
      • 2.1、创建maven工程
        • 2.1.1导入父项目
        • 2.1.2 导入web场景依赖
      • 2.2、引入依赖
      • 2.3、创建主程序
      • 2.4、编写业务
      • 2.5、测试
      • 2.6、简化配置
      • 2.7、简化部署
  • 03、了解自动配置原理
    • 1、SpringBoot特点
      • 1.1 依赖管理
      • 1.2 自动配置
    • 2、容器功能
      • 2.1、组件添加
        • 1、@Configuration(proxyBeanMethods = true/false)
        • 2、@Bean、@Component、@Controller、@Service、@Repository
        • 3、@ComponentScan、@Import
        • 4、@Conditional
      • 2.2、原生配置文件引入
        • 1、@ImportResource
      • 2.3、配置绑定
        • 准备工作
        • 1.@ConfigurationProperties
        • 2、@EnableConfigurationProperties + @ConfigurationProperties
        • 3、@Component + @ConfigurationProperties
    • 3、自动配置原理入门
      • 3.1、引导加载自动配置类
        • 1、@SpringBootConfiguration
        • 2、@ComponentScan
        • 3、@EnableAutoConfiguration 没懂
          • 1、@AutoConfigurationPackage
          • 2、@Import(AutoConfigurationImportSelector.class)
      • 3.2、按需开启自动配置项
      • 3.3、修改默认配置
      • 3.4、最佳实践
    • 4、开发小技巧
      • 4.1、Lombok
      • 4.2、dev-tools 热更新
      • 4.3、Spring Initailizr(项目初始化向导)

学习要求

  • 熟悉Spring基础
  • 熟悉Maven使用

环境要求

  • Java8及以上
  • Maven 3.3及以上:https://docs.spring.io/spring-boot/docs/current/reference/html/getting-started.html#getting-started-system-requirements

学习资料

  • 文档地址: https://www.yuque.com/atguigu/springboot

    • 文档不支持旧版本IE、Edge浏览器,请使用chrome或者firefox
  • 视频地址: http://www.gulixueyuan.com/ https://www.bilibili.com/video/BV19K4y1L7MT?p=1

  • 源码地址:https://gitee.com/leife

01、Spring与SpringBoot

1、Spring能做什么

1.1、Spring的能力

image.png

1.2、Spring的生态

https://spring.io/projects/spring-boot

覆盖了:

web开发

数据访问

安全控制

分布式

消息服务

移动开发

批处理

1.3、Spring5重大升级

1.3.1、响应式编程

两套方案

  1. Reactive Stack 响应式开发 (第二季)
  2. Servlet Stack Spring那一套 (第一季)

image.png

1.3.2、内部源码设计

基于Java8的一些新特性,如:接口默认实现。重新设计源码架构。

2、为什么用SpringBoot

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”.

快速创建出生产级别的Spring应用

2.1、SpringBoot优点

●Create stand-alone Spring applications

​ ○创建独立Spring应用

Spring Boot 也能创建原生的Spring应用

所以用Spring开发的项目可以替换为SpringBoot

不仅不会造成功能减少,还会造成功能增加

●Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)

​ ○内嵌web服务器

●Provide opinionated ‘starter’ dependencies to simplify your build configuration

​ ○自动starter依赖,简化构建配置

●Automatically configure Spring and 3rd party libraries whenever possible

​ ○自动配置Spring以及第三方功能

●Provide production-ready features such as metrics, health checks, and externalized configuration

​ ○提供生产级别的监控、健康检查及外部化配置

●Absolutely no code generation and no requirement for XML configuration

​ ○无代码生成、无需编写XML

SpringBoot是整合Spring技术栈的一站式框架
SpringBoot是简化Spring技术栈的快速开发脚手架

脚手架:帮我们搭建好所有东西

2.2、SpringBoot缺点

  • 人称版本帝,迭代快,需要时刻关注变化
  • 封装太深,内部原理复杂,不容易精通

3、时代背景

3.1、微服务

James Lewis and Martin Fowler (2014) 提出微服务完整概念。https://martinfowler.com/microservices/

In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.-- James Lewis and Martin Fowler (2014)

Q:什么是微服务?

●微服务是一种架构风格

●一个应用拆分为一组小型服务

●每个服务运行在自己的进程内,也就是可独立部署和升级

●服务之间使用轻量级HTTP交互

●服务围绕业务功能拆分

●可以由全自动部署机制独立部署

●去中心化,服务自治。服务可以使用不同的语言、不同的存储技术

3.2、分布式

img

A BCD功能一样

分布式的困难

●远程调用

●服务发现(A想要调用BCD中的一个,得知道BCD中哪个可以用)

●负载均衡

●服务容错

●配置管理

●服务监控

●链路追踪

●日志管理

●任务调度

●…

分布式的解决

●SpringBoot + SpringCloud

SpringBoot构建项目 SpringCloud把各个项目串连起来

img

3.3、云原生

原生应用如何上云。 Cloud Native

上云的困难

​ ●服务自愈

​ ●弹性伸缩

​ ●服务隔离

​ ●自动化部署

​ ●灰度发布

​ ●流量治理

​ ●…

上云的解决

img

4、如何学习SpringBoot

4.1、官网文档架构

image.png

image.png

查看版本新特性;

https://github.com/spring-projects/spring-boot/wiki#release-notes

image.png

02、SpringBoot2入门

1、系统要求

​ ●Java 8 & 兼容java14 .

​ ●Maven 3.3+

​ ●idea 2019.1.2

1.1 maven设置

<mirrors>
      <mirror>
        <id>nexus-aliyun</id>
        <mirrorOf>central</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
      </mirror>
</mirrors>
 
  <profiles>
         <profile>
              <id>jdk-1.8</id>
              <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.8</jdk>
              </activation>
              <properties>
                <maven.compiler.source>1.8</maven.compiler.source>
                <maven.compiler.target>1.8</maven.compiler.target>
                <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
              </properties>
         </profile>
  </profiles>

2、HelloWorld

需求:浏览发送/hello请求,响应 Hello,Spring Boot 2

2.1、创建maven工程

2.1.1导入父项目

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.6</version>
</parent>

2.1.2 导入web场景依赖

2.2、引入依赖

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.4.RELEASE</version>
    </parent>


    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

    </dependencies>

2.3、创建主程序

/**
 * 主程序类
 * @SpringBootApplication: 表示这是一个SpringBoot应用
 */
@SpringBootApplication
public class MainApplication {
    public static void main(String[] args) {
        SpringApplication.run(MainApplication.class,args);
    }
}

2.4、编写业务

创建一个Controller

//表示这个类中所有方法return的数据直接返回到浏览器
//@ResponseBody
//表示这个类是个@Controller  
//@Controller  

@RestController  //代替@ResponseBody和@Controller
public class HelloController {
    /**
     * 接受浏览器的hello请求,并返回数据
     * @return
     */
    @RequestMapping("/hello")
    public String handle01(){
        return "Hello,Spring Boot 2!";
    }
}

2.5、测试

直接运行main方法

image-20221210035219388

2.6、简化配置

resources下创建一个application.properties

这里面可以改所有配置

server.port=8888  //修改tomcat端口号

所有配置的修改可以在Appendices下找到

image-20221210035954565

2.7、简化部署

原本在spring中我们需要把项目打成war包放在tomcat中

在springboot中只需导入下面插件,就可以把jar包直接在服务器运行

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

clean 和 package同时选中,然后运行 打包就行

image-20221210040717707

把项目打成jar包,直接在目标服务器执行即可。

打包后的jar包会在targer文件夹下,我们使用java -jar 包名就能直接运行

image-20221210041043752

03、了解自动配置原理

1、SpringBoot特点

1.1 依赖管理

父项目做依赖管理

父项目用于依赖管理    
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.6</version>
</parent>

父项目的父项目
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-dependencies</artifactId>
    <version>2.7.6</version>
</parent>

image-20221210043052374

开发导入starter场景启动器

我们之前用了spring-boot-starter-web

1、见到很多 spring-boot-starter-* : *就某种场景
2、只要引入starter,这个场景的所有常规需要的依赖我们都自动引入
3、SpringBoot所有支持的场景
https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-starter
4、见到的 *-spring-boot-starter: 第三方为我们提供的简化开发的场景启动器。
5、所有场景启动器最底层的依赖

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter</artifactId>
  <version>2.3.4.RELEASE</version>
  <scope>compile</scope>
</dependency>

无需关注版本号,自动版本仲裁

spring-boot-dependencies中几乎声明了所有开发中常用的依赖的版本号
这种自带的版本号也叫自动版本仲裁机制

可以修改默认版本号

如果我们想用我们指定的版本可以在maven官网搜索指定版本依赖

然后在pom.xml中插入进行修改

image-20221210043354350

1.2 自动配置

  • 自动配好Tomcat

    • 引入Tomcat依赖。
    • 配置Tomcat
    <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-tomcat</artifactId>
          <version>2.3.4.RELEASE</version>
          <scope>compile</scope>
    </dependency>
    
  • 自动配好SpringMVC

    • 引入SpringMVC全套组件

    • 自动配好SpringMVC常用组件(功能)

  • 自动配好Web常见功能,如:字符编码问题

    • SpringBoot帮我们配置好了所有web开发的常见场景
  • 默认的包结构

    • 主程序所在包及其下面的所有子包里面的组件都会被默认扫描进来
    • 无需以前的包扫描配置
    • 想要改变扫描路径,@SpringBootApplication(scanBasePackages=“com.atguigu”)
      • 或者@ComponentScan 指定扫描路径
@SpringBootApplication
等同于
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan("com.atguigu.boot")
  • 各种配置拥有默认值

    • 默认配置最终都是映射到某个类上,如:MultipartProperties
    • 配置文件的值最终会绑定每个类上,这个类会在容器中创建对象
  • 按需加载所有自动配置项

    • 非常多的starter
    • 引入了哪些场景这个场景的自动配置才会开启
    • SpringBoot所有的自动配置功能都在 spring-boot-autoconfigure 包里面

2、容器功能

2.1、组件添加

bean包下加了两个类

image-20221211195828852

类中如下

image-20221211195940329

如果在Spring中我们想要在容器中添加组件需要创建一个beans.xml

然后进行配置

image-20221211200110120

在SpringBoot中有下面几种办法

1、@Configuration(proxyBeanMethods = true/false)

我们可以创建一个config包然后在里面写我们的配置类

image-20221211201726516

/**
 * @Configuration
 * 告诉Springboot这个类是配置类
 * 等同于Spring中的xml配置文件
 */
@Configuration
public class MyConfig {
    /**
     * @Bean
     * 以方法名作为组件的id,返回类型就是组件类型
     * 加上@Bean后这些方法名会出现在IOC容器中
     * @return 返回的值就是组件在容器中的实例
     */
    @Bean
    public User user01(){
        return new User("zhangsan",18);
    }
	
    //如果不想用方法名作为组件id,可以自定义组件id
    @Bean("myTom")
    public Pet tomcatPet(){
        return new Pet("tomcat");
    }
}


	/**
     * 主程序类
     * @SpringBootApplication: 表示这是一个SpringBoot应用
     */
    @SpringBootApplication
    public class MainApplication {
        public static void main(String[] args) {
            //返回IOC容器
            ConfigurableApplicationContext run = SpringApplication.run(MainApplication.class, args);

            //查看容器中的组件
            /*
            String[] names = run.getBeanDefinitionNames();
            for (String name : names) {
                System.out.println(name);
            }
            */

            //从容器中获取组件
            //因为是单例设计模式,所以无论取几次获得的组件都是一样的
            Pet pet01 = run.getBean("myTom", Pet.class);
            Pet pet02 = run.getBean("myTom", Pet.class);
            System.out.println(pet01 == pet01);
            
            //获取配置类组件
            MyConfig bean = run.getBean(MyConfig.class);
            System.out.println(bean);
            
            // 如果@Configuration(proxyBeanMethods = true)代理对象调用方法
            // SpringBoot总会检查这个组件是否在容器中有
            // 也就是说proxyBeanMethods为true时会保持组件单实例
            // 如果 proxyBeanMethods为false 每次获取的实例就不一样
            User user01 = bean.user01();
            User user02 = bean.user01();
            System.out.println( user01 == user02);  //true
        }
    }

  • 基本使用

  • Full模式与Lite模式

    Full(proxyBeanMethods = true)【保证每个@Bean方法被调用多少次返回的组件都是单实例的】

    Lite(proxyBeanMethods = false)【每个@Bean方法被调用多少次返回的组件都是新创建的】

    • 最佳实战
      • 配置 类组件之间无依赖关系Lite模式加速容器启动过程,减少判断
      • 配置类组件之间有依赖关系,方法会被调用得到之前单实例组件,用Full模式
#############################Configuration使用示例######################################################
/**
 * 1、配置类里面使用@Bean标注在方法上给容器注册组件,默认也是单实例的
 * 2、配置类本身也是组件
 * 3、proxyBeanMethods:代理bean的方法
 *      Full(proxyBeanMethods = true)、【保证每个@Bean方法被调用多少次返回的组件都是单实例的】
 *      Lite(proxyBeanMethods = false)【每个@Bean方法被调用多少次返回的组件都是新创建的】
 *      组件依赖必须使用Full模式默认。其他默认是否Lite模式
 *
 *
 *
 */
@Configuration(proxyBeanMethods = false) //告诉SpringBoot这是一个配置类 == 配置文件
public class MyConfig {

    /**
     * Full:外部无论对配置类中的这个组件注册方法调用多少次获取的都是之前注册容器中的单实例对象
     * @return
     */
    @Bean //给容器中添加组件。以方法名作为组件的id。返回类型就是组件类型。返回的值,就是组件在容器中的实例
    public User user01(){
        User zhangsan = new User("zhangsan", 18);
        //user组件依赖了Pet组件
        zhangsan.setPet(tomcatPet());
        return zhangsan;
    }

    @Bean("tom")
    public Pet tomcatPet(){
        return new Pet("tomcat");
    }
}


################################@Configuration测试代码如下########################################
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan("com.atguigu.boot")
public class MainApplication {

    public static void main(String[] args) {
        //1、返回我们IOC容器
        ConfigurableApplicationContext run = SpringApplication.run(MainApplication.class, args);

        //2、查看容器里面的组件
        String[] names = run.getBeanDefinitionNames();
        for (String name : names) {
            System.out.println(name);
        }

        //3、从容器中获取组件

        Pet tom01 = run.getBean("tom", Pet.class);

        Pet tom02 = run.getBean("tom", Pet.class);

        System.out.println("组件:"+(tom01 == tom02));


        //4、com.atguigu.boot.config.MyConfig$$EnhancerBySpringCGLIB$$51f1e1ca@1654a892
        MyConfig bean = run.getBean(MyConfig.class);
        System.out.println(bean);

        //如果@Configuration(proxyBeanMethods = true)代理对象调用方法。SpringBoot总会检查这个组件是否在容器中有。
        //保持组件单实例
        User user = bean.user01();
        User user1 = bean.user01();
        System.out.println(user == user1);


        User user01 = run.getBean("user01", User.class);
        Pet tom = run.getBean("tom", Pet.class);

        System.out.println("用户的宠物:"+(user01.getPet() == tom));



    }
}

2、@Bean、@Component、@Controller、@Service、@Repository

和Spring 中的一样

3、@ComponentScan、@Import

@ComponentScan(“com.atguigu.boot”) 修改包扫描位置的,默认是扫描主包下所有包

 * 4@Import({User.class, DOMObjectHelper.class})
 *     	@Import导入一个组件数组
 *      给容器中调用无参构造,自动创建出这两个类型的组件
 *    	默认组件的名字就是全类名
 *
 */
     
//获取同个类的所有组件
//@Import导入的组件都是带包名的全类名
String[] beanNamesForType = run.getBeanNamesForType(User.class);
for (String s : beanNamesForType) {
    System.out.println(s);
}
DOMObjectHelper bean1 = run.getBean(DOMObjectHelper.class);
System.out.println(bean1);     
//com.qiuyu.bean.User   @Import
//user01   @Bean
//sun.plugin.dom.DOMObjectHelper@732bb66d   @Import

@Import 高级用法: https://www.bilibili.com/video/BV1gW411W7wy?p=8

4、@Conditional

条件装配:满足Conditional指定的条件,则进行组件注入

image-20221211210529392

//@Bean("myTom")
public Pet tomcatPet(){
    return new Pet("tomcat");
}

//@ConditionalOnBean 判断是否有myTom这个组件,如果没有的话就不创建user01组件
//注意 @Bean("myTom") 需要在 @ConditionalOnBean(name = "myTom") 前面,不然永远不会创建user01
@ConditionalOnBean(name = "myTom")
@Bean
public User user01(){
    User user = new User("zhangsan",18);
    //User组件依赖了Pet组件
    user.setPet(tomcatPet());
    return user;
}


//用来判断容器中是否有当前组件
boolean tom = run.containsBean("myTom");
System.out.println("容器中Tom组件:"+tom);

boolean user01 = run.containsBean("user01");
System.out.println("容器中user01组件:"+user01);

2.2、原生配置文件引入

1、@ImportResource

如果项目原来是Spring的,已经有了bean的xml配置文件,想要转为SpringBoot,无需一个一个用@bean添加,可以使用@ImportResource导入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"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="haha" class="com.qiuyu.bean.User">
        <property name="name" value="zhangsan"></property>
        <property name="age" value="18"></property>
    </bean>

    <bean id="hehe" class="com.qiuyu.bean.Pet">
        <property name="name" value="tomcat"></property>
    </bean>
    
</beans>
@ImportResource("classpath:beans.xml") //注意:左右两边都不能有空格
public class MyConfig {}

======================测试=================
        boolean haha = run.containsBean("haha");
        boolean hehe = run.containsBean("hehe");
        System.out.println("haha:"+haha);//true
        System.out.println("hehe:"+hehe);//true

2.3、配置绑定

如何使用Java读取到properties文件中的内容,并且把它封装到JavaBean中,以供随时使用;

//原生java中较为麻烦
public class getProperties {
     public static void main(String[] args) throws FileNotFoundException, IOException {
         Properties pps = new Properties();
         pps.load(new FileInputStream("a.properties"));
         Enumeration enum1 = pps.propertyNames();//得到配置文件的名字
         while(enum1.hasMoreElements()) {
             String strKey = (String) enum1.nextElement();
             String strValue = pps.getProperty(strKey);
             System.out.println(strKey + "=" + strValue);
             //封装到JavaBean。
         }
     }
 }

准备工作

创建一个Car类

image-20221211214849495

数据写入配置文件中

image-20221211214756585

controller中写一个car请求

image-20221211215022010

1.@ConfigurationProperties

/**
 * 只有在容器中的组件,才会拥有SpringBoot提供的强大功能
 */
//放入容器中,只有放入容器中才有这些功能
@Component  
// prefix指前缀
@ConfigurationProperties(prefix = "mycar")
public class Car {

    private String brand;
    private Integer price;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Car{" +
                "brand='" + brand + '\'' +
                ", price=" + price +
                '}';
    }
}

2、@EnableConfigurationProperties + @ConfigurationProperties

有时候我们使用别的包的时候,没法在别人的代码上加入@Compoent

我们就可以使用这种方法

在Car了中加入 @ConfigurationProperties注解

在配置类中加入@EnableConfigurationProperties注解

image-20221211215630726

3、@Component + @ConfigurationProperties

@EnableConfigurationProperties(Car.class)
//1、开启Car配置绑定功能
//2、把这个Car这个组件自动注册到容器中
public class MyConfig {
}

3、自动配置原理入门

3.1、引导加载自动配置类

@SpringBootApplication 包括了

  • @SpringBootConfiguration 配置类
  • @ComponentScan 包扫描
  • @EnableAutoConfiguration
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
		@Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })
public @interface SpringBootApplication{}


======================
    

1、@SpringBootConfiguration

@Configuration。代表当前是一个配置类

2、@ComponentScan

指定扫描哪些,Spring注解;

3、@EnableAutoConfiguration 没懂

@AutoConfigurationPackage
@Import(AutoConfigurationImportSelector.class)
public @interface EnableAutoConfiguration {}
1、@AutoConfigurationPackage

自动配置包?指定了默认的包规则

@Import(AutoConfigurationPackages.Registrar.class)  //给容器中导入一个组件
public @interface AutoConfigurationPackage {}

//利用Registrar给容器中导入一系列组件
//将指定的一个包下的所有组件导入进来?MainApplication 所在包下。
2、@Import(AutoConfigurationImportSelector.class)
1、利用getAutoConfigurationEntry(annotationMetadata);给容器中批量导入一些组件
2、调用List<String> configurations = getCandidateConfigurations(annotationMetadata, attributes)获取到所有需要导入到容器中的配置类
3、利用工厂加载 Map<String, List<String>> loadSpringFactories(@Nullable ClassLoader classLoader);得到所有的组件
4、从META-INF/spring.factories位置来加载一个文件。
	默认扫描我们当前系统里面所有META-INF/spring.factories位置的文件
    spring-boot-autoconfigure-2.3.4.RELEASE.jar包里面也有META-INF/spring.factories

image.png

文件里面写死了spring-boot一启动就要给容器中加载的所有配置类
spring-boot-autoconfigure-2.3.4.RELEASE.jar/META-INF/spring.factories
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration,\
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration,\
org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration,\
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration,\
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration,\
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration,\
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration,\
org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration,\
org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration,\
org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration,\
org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration,\
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration,\
org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRestClientAutoConfiguration,\
org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.ldap.LdapRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.mongo.MongoReactiveRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration,\
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcTransactionManagerAutoConfiguration,\
org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration,\
org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration,\
org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration,\
org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration,\
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration,\
org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration,\
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration,\
org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration,\
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration,\
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration,\
org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration,\
org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration,\
org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration,\
org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration,\
org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration,\
org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration,\
org.springframework.boot.autoconfigure.influx.InfluxDbAutoConfiguration,\
org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration,\
org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration,\
org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,\
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\
org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration,\
org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration,\
org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration,\
org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration,\
org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration,\
org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration,\
org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration,\
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration,\
org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration,\
org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration,\
org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration,\
org.springframework.boot.autoconfigure.jsonb.JsonbAutoConfiguration,\
org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration,\
org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration,\
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration,\
org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration,\
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration,\
org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration,\
org.springframework.boot.autoconfigure.mail.MailSenderValidatorAutoConfiguration,\
org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration,\
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration,\
org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration,\
org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration,\
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\
org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration,\
org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration,\
org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration,\
org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration,\
org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration,\
org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration,\
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration,\
org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration,\
org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration,\
org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration,\
org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration,\
org.springframework.boot.autoconfigure.security.rsocket.RSocketSecurityAutoConfiguration,\
org.springframework.boot.autoconfigure.security.saml2.Saml2RelyingPartyAutoConfiguration,\
org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration,\
org.springframework.boot.autoconfigure.session.SessionAutoConfiguration,\
org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration,\
org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration,\
org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration,\
org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration,\
org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration,\
org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration,\
org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration,\
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration,\
org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration,\
org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration,\
org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration,\
org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration,\
org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration,\
org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration,\
org.springframework.boot.autoconfigure.web.reactive.ReactiveWebServerFactoryAutoConfiguration,\
org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration,\
org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration,\
org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpConnectorAutoConfiguration,\
org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration,\
org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration,\
org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration,\
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration,\
org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration,\
org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration,\
org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration,\
org.springframework.boot.autoconfigure.websocket.reactive.WebSocketReactiveAutoConfiguration,\
org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration,\
org.springframework.boot.autoconfigure.websocket.servlet.WebSocketMessagingAutoConfiguration,\
org.springframework.boot.autoconfigure.webservices.WebServicesAutoConfiguration,\
org.springframework.boot.autoconfigure.webservices.client.WebServiceTemplateAutoConfiguration

3.2、按需开启自动配置项

虽然我们127个场景的所有自动配置启动的时候默认全部加载。xxxxAutoConfiguration
按照条件装配规则(@Conditional),最终会按需配置。

3.3、修改默认配置

    @Bean
	@ConditionalOnBean(MultipartResolver.class)  //容器中有这个类型组件
	@ConditionalOnMissingBean(name = DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME) //容器中没有这个名字 multipartResolver 的组件
	public MultipartResolver multipartResolver(MultipartResolver resolver) {
        //给@Bean标注的方法传入了对象参数,这个参数的值就会从容器中找。
        //SpringMVC multipartResolver。防止有些用户配置的文件上传解析器不符合规范
		// Detect if the user has created a MultipartResolver but named it incorrectly
		return resolver;
	}
	给容器中加入了文件上传解析器;

SpringBoot默认会在底层配好所有的组件。但是如果用户自己配置了以用户的优先

@Bean
@ConditionalOnMissingBean
public CharacterEncodingFilter characterEncodingFilter() {
}

总结:

  • SpringBoot先加载所有的自动配置类 xxxxxAutoConfiguration

  • 每个自动配置类按照条件进行生效,默认都会绑定配置文件指定的值。xxxxProperties里面拿。xxxProperties和配置文件进行了绑定

  • 生效的配置类就会给容器中装配很多组件

  • 只要容器中有这些组件,相当于这些功能就有了

  • 定制化配置

    • 用户直接自己@Bean替换底层的组件
    • 用户去看这个组件是获取的配置文件什么值就去修改。

xxxxxAutoConfiguration —> 组件 —> xxxxProperties里面拿值 ----> application.properties

3.4、最佳实践

  • 引入场景依赖

    • https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-starter
  • 查看自动配置了哪些(选做)

    • 自己分析,引入场景对应的自动配置一般都生效了
    • 配置文件中debug=true开启自动配置报告。Negative(不生效)\Positive(生效)
  • 是否需要修改

    • 参照文档修改配置项
      • https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html#common-application-properties
      • 自己分析。xxxxProperties绑定了配置文件的哪些。
    • 自定义加入或者替换组件
      • @Bean、@Component。。。
    • 自定义器 XXXXXCustomizer

4、开发小技巧

4.1、Lombok

简化JavaBean开发,能让我们看javabean的时候更加的整洁

  1. 导入lombok的依赖

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
    </dependency>
    
  2. 安装lombok插件
    image-20221211233709436

  3. 加上@Data

    会自动为我们加上getter setter

    image-20221211233813999

  4. 加上@ToString
    自动重写ToString方法
    image-20221211234136645

  5. 加上构造器

    @NoArgsConstructor  //无参构造器
    @AllArgsConstructor	//全参构造器
    
  6. HashCode 和 equals也可以

    @EqualsAndHashCode
    
  7. 日志

    @Slf4j
    @RestController
    public class HelloController {
        @RequestMapping("/hello")
        public String handle01(@RequestParam("name") String name){
            
            log.info("请求进来了....");
            
            return "Hello, Spring Boot 2!"+"你好:"+name;
        }
    }
    

4.2、dev-tools 热更新

Ctrl + F9 或者 image-20221211235917851
就可以更新项目,本质是自动重启项目(restart)

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

Web开发的时候好用

4.3、Spring Initailizr(项目初始化向导)

image-20221212000358936

选择要用的模块

image-20221212000537846

生成的项目结果

  • static 放静态资源
  • templates 放web页面
  • application.properties 配置文件

image-20221212001012778

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

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

相关文章

学生HTML个人网页作业作品:基于web在线汽车网站的设计与实现 (宝马轿车介绍)

&#x1f389;精彩专栏推荐 &#x1f4ad;文末获取联系 ✍️ 作者简介: 一个热爱把逻辑思维转变为代码的技术博主 &#x1f482; 作者主页: 【主页——&#x1f680;获取更多优质源码】 &#x1f393; web前端期末大作业&#xff1a; 【&#x1f4da;毕设项目精品实战案例 (10…

代码随想录刷题记录 day41 单词拆分+背包总结

代码随想录刷题记录 day41 单词拆分背包总结 参考&#xff1a;代码随想录 139. 单词拆分 思想 dp[i] 字符串长度为i&#xff0c;若dp[i]true&#xff0c;表示可以拆分为一个或多个在字典中出现的单词 递推公式 ​ 如果dp[j]true&#xff0c;[j,i]这个区间的子串出现在字典…

[附源码]Python计算机毕业设计大学生兼职平台Django(程序+LW)

该项目含有源码、文档、程序、数据库、配套开发软件、软件安装教程 项目运行 环境配置&#xff1a; Pychram社区版 python3.7.7 Mysql5.7 HBuilderXlist pipNavicat11Djangonodejs。 项目技术&#xff1a; django python Vue 等等组成&#xff0c;B/S模式 pychram管理等…

[附源码]计算机毕业设计基于Java的失物招领平台Springboot程序

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; SSM mybatis Maven Vue 等等组成&#xff0c;B/S模式 M…

C++ 多态之虚继承

什么是虚继承 C支持多继承的形式&#xff0c;但若被继承的不同基类又同属与某一个接口类or基类的派生类&#xff0c;那么很容易产生经典的菱形继承问题&#xff0c;这样不可避免的带来了命名冲突&#xff0c;访问不明确的问题&#xff0c;如图所示&#xff1a; 虚继承解决的…

【目标感知:IVIF:轻量级架构】

SELAFUSE: SEARCH A LIGHTWEIGHT ARCHITECTURE FOR TARGET-AWARE INFRARED AND VISIBLE IMAGE FUSION &#xff08;SELAFUSE: 搜索轻量级架构以实现目标感知的红外和可见光图像融合&#xff09; 尽管深度学习技术最近在红外和可见光图像融合方面表现出出色的性能&#xff0c;…

如何使用DNS加速你的浏览器访问速度?

不知道大家有没有遇到过这种情况, 我们访问用浏览器网页无法正常显示, 但是我们使用的QQ却能正常的打开? 这是因为 : 我们在登录QQ的时候是直接访问的腾讯的服务器, 在下载好的QQ客户端已经帮你配置好了所有的IP, 所有没有域名解析的操作, 所以可以正常的登录 解决办法如下…

c#入门-引用变量

引用变量 引用传递&#xff0c;是c#为了以更为安全的方式代替指针做出来的产物。 类似引用类型储存一个地址。但和引用类型不同的是&#xff0c;连对他本身的访问和修改都会转为对原值的访问和修改。 声明引用变量 引用变量在声明是&#xff0c;需要给类型前加上关键字ref。…

02.Ioc容器加载过程-Bean的生命周期深度剖析——四

BeanFactory&#xff1a;使用简单工厂&#xff0c;负责生产Bean FactoryBean&#xff1a;被他修饰的的类&#xff0c;成为特殊的类&#xff0c;调用getObgrct()得到最终的类。。。用于类的实现接口重写方法&#xff0c;从而扩展功能 IOC再总结&#xff1a; 实例化AnnotationCo…

【阅读笔记】《人月神话》思想提炼

文章目录前言1. 衡量工作量1.1. 单位1.2. 工作量与人月&#xff08;人天&#xff09;的关系1.2.1 忽略了沟通成本1.2.2 忽略了需求的特征2. 外科手术团队 —— 少部分人主导项目2.1. 执行方式2.2. 遵守的理念3. 警惕“遗留需求”4. 管理进度4.1 不要泄气4.2. 设定合适的里程碑并…

java项目_第170期ssm二手手机回收平台系统_ssm毕业设计_计算机毕业设计

java项目-第170期ssm二手手机回收平台系统-ssm毕业设计_计算机毕业设计 【源码请到下载专栏下载】 今天分享的项目是《ssm二手手机回收平台系统》 该项目分为2个角色&#xff0c;管理员和用户。 用户可以浏览前台,包含功能有&#xff1a; 首页、手机商城、新闻资讯、跳转到后台…

MRR和ICP

MRR和ICPMulti-Range Read优化ICP索引下推优化Multi-Range Read优化 MySQL5.6版本开始支持Multi-Range Read&#xff08;MRR&#xff09;优化。Multi-Range Read优化的目的就是为了减少磁盘的随机访问&#xff0c;并且将随机访问转化为较为顺序的数据访问&#xff0c;这对于IO…

每天进步一点点 -- pytorch学习:张量的介绍与创建

推荐查看的文档&#xff1a;机器视觉全栈|机器视觉教程|docsify|pytorch官方教程中文版|opencv-python官方教程中文版|open3D(0.15.1)官方教程中文版 Tensors个人理解为在GPU上工作的数组和矩阵&#xff0c;既然是数组和矩阵&#xff0c;那么里面也保存一些类型的内容&#xf…

圣天诺加密狗(HASP)破解

圣天诺加密狗&#xff08;HASP&#xff09;破解 一、编写测试程序 dll代码&#xff1a; #include "pch.h" #include<stdlib.h> BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved) {switch (ul_reason_for_call){case D…

[附源码]计算机毕业设计和vue的茶文化交流平台的设计与实现Springboot程序

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; Springboot mybatis MavenVue等等组成&#xff0c;B/S模式…

SVG 实现拟物态圆环进度条

前言 &#x1f44f;SVG 实现拟物态圆环进度条&#xff0c;速速来Get吧~ &#x1f947;文末分享源代码。记得点赞关注收藏&#xff01; 1.实现效果 2.实现步骤 定义一个圆角矩形作为父容器&#xff0c;背景色为–bg --bg: #edf1f5;<div class"container">&l…

lunar.js 基本使用学习笔记

文章目录lunar 基本使用学习笔记介绍基本使用部分文档 API 转载阳历相关的方法 APISolar 阳历阳历实例化阳历对象可以使用多种字符串输出方式&#xff1a;获取年、月、日儒略日获取星期判断是否闰年获取节日星座阳历日期推移&#xff08;可**跳过节假日、周六周日**&#xff09…

[附源码]Nodejs计算机毕业设计基于Java的医院预约挂号系统Express(程序+LW)

该项目含有源码、文档、程序、数据库、配套开发软件、软件安装教程。欢迎交流 项目运行 环境配置&#xff1a; Node.js Vscode Mysql5.7 HBuilderXNavicat11VueExpress。 项目技术&#xff1a; Express框架 Node.js Vue 等等组成&#xff0c;B/S模式 Vscode管理前后端分…

SpringMVC的传参方式?

Request参数传递 1. Servlet传统API 2. Map/Model/ModelMap 作用域&#xff1a;request Map 是原生态的JDK类 Model/ModelMap 是Spring的类 除了来源不同&#xff0c;传递参数的功能都一致&#xff0c;用哪个都可以 Session参数传递 1. 传统方法HttpServletSession 2. …

[附源码]计算机毕业设计工程施工多层级管理架构Springboot程序

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; SSM mybatis Maven Vue 等等组成&#xff0c;B/S模式 M…