iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > JAVA >SpringBoot框架
  • 420
分享到

SpringBoot框架

springbootmvcjavaspringbootrestful 2023-08-31 15:08:06 420人浏览 八月长安
摘要

目录  1.1 简介 1.2 特性 1.3 四大核心 2 springboot入门案例 2.1 SpringBoot 项目开发步骤  2.2  创建一个 Spring MVC 的 Spring BootController  2.3  分析

目录 

1.1 简介

1.2 特性

1.3 四大核心

2 springboot入门案例

2.1 SpringBoot 项目开发步骤

 2.2  创建一个 Spring MVC 的 Spring BootController 

2.3  分析

2.4 核心配置文件格式

2.5  Spring Boot 前端使用 JSP

3 SpringBoot框架Web开发

 3.1  Spring Boot 集成 MyBatis 

 3.2 DAO 的其它开发方式

 3.3 Spring Boot 事务支持

3.4  Spring Boot 下的 Spring MVC(注解)

 3.5 SpringBoot实现RESTFUL

3.6  Spring Boot 集成 Redis 

1.1 简介

SpringBootspring家族中的一个全新框架,用来简化spring程序的创建和开发过程。在以往我们通过springMVC+Spring+mybatis框架进行开发的时候,我们需要配置WEB.xml,spring配置,mybatis配置,然后整合在一起,而springboot抛弃了繁琐的xml配置过程,采用大量默认的配置来简化我们的spring开发过程。

SpringBoot化繁为简,使开发变得更加的简单迅速。

1.2 特性

  • 能够快速创建基于spring的程序
  • 能够直接使用Java main方法启动内嵌的Tomcat服务器运行springboot程序,不需要部署war包
  • 提供约定的starter POM来简化Maven配置,让Maven的配置变得简单
  • 自动化配置,根据项目的Maven依赖配置,springboot自动配置spring、springmvc
  • 提供了程序的健康检查功能
  • 基本可以完全不使用xml配合文件,采用注解配置

1.3 四大核心

        自动配置、起步依赖、Actuator、命令行界面

2 springboot入门案例

2.1 SpringBoot 项目开发步骤

        (1)创建一个 Module,选择类型为Spring Initializr 快速构建

        (2)设置 GAV 坐标及 pom 配置信息 

 

        (3)选择 Spring Boot 版本及依赖 

        (4)设置模块名称、Content Root 路径及模块文件的目录,然后点击finish即可

        (5)项目结构如下:

        static:存放静态资源。如图片、CSSjavascript 等 
        templates:存放 Web 页面的模板文件 
        application.properties/application.yml 用于存放程序的各种依赖模块的配置信息,比如 服务端口,数据库连接配置等
        .gitignore:使用版本控制工具 git 的时候,设置一些忽略提交的内容 
        Application.java:SpringBoot 程序执行的入口,执行该程序中的 main 方法,启动当前SpringBoot项目。

        (6)对pom.xml文件进行解释

   4.0.0          org.springframework.boot      spring-boot-starter-parent      2.2.1.RELEASE              com.bjpowernode.springboot  002-springboot-springmvc  1.0.0     002-springboot-springmvc    Demo project for Spring Boot           1.8                        org.springframework.boot          spring-boot-starter-web                         org.springframework.boot          spring-boot-starter-test          test                                          org.junit.vintage                  junit-vintage-engine                                                                           org.springframework.boot              spring-boot-maven-plugin                    

 2.2  创建一个 Spring MVC 的 Spring BootController 

      (1)创建SpringBootController 类

        注意:新创建的类一定要位于 Application 同级目录或者下级目录,否则 SpringBoot 加
载不到。 

package com.bjpowernode.springboot.web;  import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody;  @Controller public class SpringBootController {   @RequestMapping(value = "/springBoot/say")  public @ResponseBody String say() {      return "Hello,springBoot!";  } } 

        (2)启动Application类中的main方法

        通过在控制台的输出,可以看到启动 SpringBoot 框架,会启动一个内嵌的 tomcat,端
口号为 8080,上下文根为空 。

         (3)在浏览器中输入 Http://localhost:8080/springBoot/say进行访问 

2.3  分析


        (1)spring-boot-starter-parent 是一个 Springboot 的父级依赖,开发 SpringBoot 程序都需
要继承该父级项目,它用来提供相关的 Maven 默认依赖,使用它之后,常用的 jar
包依赖可以省去 version 配置 
        (2)Spring Boot 提供了一些默认的jar 包的依赖,可查看该父级依赖的 pom 文件 
        (3)如果不想使用某个默认的依赖版本,可以通过 pom.xml 文件的属性配置覆盖各个
依赖项,比如覆盖 Spring 版本: 

       5.0.0.RELEASE   

        (4) @SpringBootApplication 注解是 Spring Boot 项目的核心注解,主要作用是开启
Spring 自动配置
,如果在 Application 类上去掉该注解,那么不会启动 SpringBoot程序 
        (5)main 方法是一个标准的 Java 程序的 main 方法,是boot项目启动运行的入口
        (6)@Controller 及 @ResponseBody 依然是我们之前的 Spring MVC,因为 Spring Boot
的里面依然是使用我们的 Spring MVC + Spring + MyBatis 等框架 

2.4 核心配置文件格式

        (1).properties 文件(默认采用该文件) 

通过修改 application.properties 配置文件,修改默认 tomcat 端口号及项目上下文件根:

#设置内嵌 Tomcat 端口号 server.port=9090  #配置项目上下文根 server.servlet.context-path=/003-springboot-port-context-path 

 页面显示结果:

        (2) .yml 文件 :

        项目名称:004-springboot-yml

        yml 是一种 yaml 格式的配置文件,主要采用一定的空格、换行等格式排版进行配置。它能够直观的被计算机识别数据序列化格式,容易被人类阅读,yaml 类似于 xml,但是语法比 xml 简洁很多,值与前面的冒号配置项必须要有一个空格, yml 后缀也可以使用 yaml 后缀 。

        注意:当两种格式配置文件同时存在时,使用的是.properties 配置文件。

        (3)多环境配置(.properties方式

        在实际开发的过程中,我们的项目会经历很多的阶段(开发->测试->上线),每个阶段
的配置也会不同,例如:端口、上下文根、数据库等,那么这个时候为了方便在不同的环境
之间切换,SpringBoot 提供了多环境配置
,具体步骤如下 :

        项目名称:005-springboot-multi-environment 

为每个环境创建一个配置文件,命名必须为 application-环境标识.properties|yml

 application-dev.properties 

#开发环境#设置内嵌 Tomcat 默认端口号 server.port=8080  #设置项目的上下文根 server.servlet.context-path=/005-springboot-multi-environment-dev 

application-product.properties

#生产环境  #配置内嵌 Tomcat 默认端口号 server.port=80  #配置项目上下文根 server.servlet.context-path=/005-springboot-multi-environment-product 

application-test.properties

#测试环境  #配置内嵌 Tomcat 端口号 server.port=8081  #配置项目的上下文根 server.servlet.context-path=/005-springboot-multi-environment-test 

 在总配置文件 application.properties 进行环境的激活

#SpringBoot 的总配置文件  #激活开发环境 #spring.profiles.active=dev  #激活测试环境 #spring.profiles.active=test  #激活生产环境 spring.profiles.active=product 

        (4)多环境配置(.yml方式

 application-dev.yml

#设置开发环境配置  server:  port: 8080 #设置 Tomcat 内嵌端口号  servlet:   context-path: /dev #设置上下文根 

application-product.yml

#设置生产环境配置  server:  port: 80  servlet:   context-path: /product 

application-test.yml

#设置测试环境配置  server:  port: 9090  servlet:   context-path: /test

 在总配置文件 application.yml进行环境的激活

#springboot 总配置文件  #激活开发环境 #spring: # profiles: #  active: dev   #激活测试环境 #spring: # profiles: #  active: test  #激活生产环境 spring:  profiles:   active: product 

        (5)Spring Boot 自定义配置

        在 SpringBoot 的核心配置文件中,除了使用内置的配置项之外,我们还可以在自定义配
置,然后采用如下注解去读取配置的属性值:

        (A)@Value注解 用于逐个读取application.properties中的配置

        案例演示:

       (1) 在核心配置文件 applicatin.properties 中,添加两个自定义配置项 school.name 和
website。idea 中可以看到这两个属性不能被 SpringBoot 识别,背景是桔色的 :

.properties方式

 .yml方式

#设置端口号及上下文根 server:  port: 9090  servlet:   context-path: /  school:  name: SSM websit: http://www.baidu.com 

        (2)在 SpringBootController 中定义属性,并使用@Value 注解或者自定义配置值,并对其方法进行测试

@Controller public class SpringBootController {   @Value("${school.name}")  private String schoolName;   @Value("${websit}")  private String websit;   @RequestMapping(value = "/springBoot/config")  public @ResponseBody String say() {  return schoolName + "------" + websit;  } } 

        (3)重新运行 Application,在浏览器中进行测试 

         (B)@ConfigurationProperties

        作用:将整个文件映射成一个对象,用于自定义配置项比较多的情况 。

        案例演示:

        (1)在 com.abc.springboot.config 包下创建 ConfigInfo 类,并为该类加上 Component 和
ConfigurationProperties 注解,并在 ConfigurationProperties 注解中添加属性 prefix,可以区分同名配置 。

@Data@Component @ConfigurationProperties(prefix = "school") public class ConfigInfo {   private String name;   private String websit; } 

        (2)application.properties 配置文件

#设置内嵌 Tomcat 端口号 server.port=9090  #设置上下文根 server.servlet.context-path=/config  school.name=ssm school.websit=http://www.baidu.com 

        (3)在 SpringBootController 中注入 ConfigInfo 配置类 

@Autowired private ConfigInfo configInfo; 

        (4)修改 SpringBootController 类中的测试方法

@RequestMapping(value = "/springBoot/config") public @ResponseBody String say() {  return configInfo.getName() + "=======" + configInfo.getWebsit(); } 

        (5)重新运行 Application,在浏览器中进行测试 

         (C)警告解决

        在 ConfigInfo 类中使用了 ConfigurationProperties 注解后,IDEA 会出现一个警告,不影响程序的执行。

        点击 open documentnation 跳转到网页,在网页中提示需要加一个依赖,我们将这
个依赖拷贝,粘贴到 pom.xml 文件中 即可。

    org.springframework.boot   spring-boot-configuration-processor   true  

        (D)中文乱码

    如果在 SpringBoot 核心配置文件中有中文信息,会出现乱码: 

  • 一般在配置文件中,不建议出现中文(注释除外) 
  • 如果出现中文,可以先转化为 ASCII 码 

2.5  Spring Boot 前端使用 jsP

         (1)在 pom.xml 文件中配置以下依赖项

    org.apache.tomcat.embed  tomcat-embed-jasper       javax.servlet  javax.servlet-api    javax.servlet.jsp  javax.servlet.jsp-api  2.3.1       javax.servlet  jstl  

        (2)在 pom.xml 的 build 标签中要配置以下信息 
        SpringBoot 要求 jsp 文件必须编译到指定的 META-INF/resources 目录下才能访问,否则
访问不到
。其实官方已经更建议使用模板技术。

               src/main/webapp            META-INF/resources                      **  Student queryStudentById(Integer id); }

        (C)在 service.impl 包下创建 service 接口并编写代码

@Service public class StudentServiceImpl implements StudentService {   @Autowired  private StudentMapper studentMapper;   @Override  public Student queryStudentById(Integer id) {  return studentMapper.selectByPrimaryKey(id);  } } 

        (D)如果在 web 中导入 service 存在报错,可以尝试进行如下配置解决 

        (E) 在 Mybatis 反向工程生成的 StudentMapper 接口上加一个 Mapper 注解 
@Mapper 作用:mybatis 自动扫描数据持久层的映射文件及 DAO 接口的关系

@Mapper public interface StudentMapper { }

        (F)默认情况下,Mybatis 的 xml 映射文件不会编译到 target 的 class 目录下,所
以我们需要在 pom.xml 文件中配置 resource 。

    src/main/java        ***.xml                                           org.mybatis.generator          mybatis-generator-maven-plugin          1.3.6                                      GeneratORMapper.xml              true              true                                 org.springframework.boot          spring-boot-maven-plugin          

application. properties核心配置文件

#配置内嵌 Tomcat 端口号 server.port=8090  #配置项目上下文根 server.servlet.context-path=/ #配置数据库的连接信息 #注意这里的驱动类有变化 spring.datasource.driver-class-name=com.Mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8  spring.datasource.username=root spring.datasource.passWord=root

通过逆向工程生成 DAO

创建 RESTfulController

@RestController public class RESTfulController {     @PostMapping(value = "/springBoot/student/{name}/{age}")  public Object addStudent(@PathVariable("name") String name, @PathVariable("age") Integer age) {   Map retMap = new HashMap();  retMap.put("name",name);  retMap.put("age",age);    return retMap;  }     @DeleteMapping(value = "/springBoot/student/{id}")  public Object removeStudent(@PathVariable("id") Integer id) {   return "删除的学生 id 为:" + id;  }     @PutMapping(value = "/springBoot/student/{id}")  public Object modifyStudent(@PathVariable("id") Integer id) {   return "修改学生的 id 为" + id;  }   @GetMapping(value = "/springBoot/student/{id}")  public Object queryStudent(@PathVariable("id") Integer id) {   return "查询学生的 id 为" + id;  } } 

使用 Postman 模拟发送请求,进行测试 :

 

 

 

         (4)请求冲突的问题

           解决方案:<1>修改路径     <2>修改请求方式

创建 RESTfulController 类,结合 Postman 进行测试说明 :

@RestController public class RESTfulController {     @GetMapping(value = "/springBoot/order/{id}/{status}")  public Object queryOrder(@PathVariable("id") Integer id, @PathVariable("status") Integer status) {   Map map = new HashMap();   map.put("id",id);  map.put("status",status);   return map;  }     @GetMapping(value = "/springBoot/{id}/order/{status}")  public Object queryOrder1(@PathVariable("id") Integer id, @PathVariable("status") Integer status) {  Map map = new HashMap();   map.put("id",id);  map.put("status",status);   return map;  }     @GetMapping(value = "/springBoot/{status}/order/{id}")  public Object queryOrder2(@PathVariable("id") Integer id,  @PathVariable("status") Integer status) {  Map map = new HashMap();   map.put("id",id);  map.put("status",status);   return map;  }      @PostMapping(value = "/springBoot/{status}/order/{id}")  public Object queryOrder3(@PathVariable("id") Integer id,  @PathVariable("status") Integer status) {  Map map = new HashMap();   map.put("id",id);  map.put("status",status);   return map;  }       } 

        (5)RESTful 原则

  • 增 post 请求、删 delete 请求、改 put 请求、查 get 请求 
  • 请求路径不要出现动词:

        

  •  分页、排序等操作,不需要使用斜杠传参数

        

3.6  Spring Boot 集成 Redis 

        完善根据学生 id 查询学生的功能:先从 redis 缓存中查找,如果找不到,再从数据库中
查找,然后放到 redis 缓存中。

具体实现步骤:

(A)首先通过 MyBatis 逆向工程生成实体 bean 和数据持久层 :

(B)在 pom.xml 文件中添加 redis 依赖

   org.springframework.boot  spring-boot-starter-data-redis  

 (C)Spring Boot 核心配置文件application.properties 如下:

#配置内嵌 Tomcat 端口号 server.port=9090  #配置项目上下文根 server.servlet.context-path=/016-springboot-redis  #配置连接 Mysql 数据库信息 spring.datasource.url=jdbc:mysql://127.0.0.1:3306/springboot?useUnicode=true&characterEncoding=UTF8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=root spring.datasource.password=root #配置 redis 连接信息 spring.redis.host=127.0.0.1 spring.redis.port=6379 #spring.redis.password=root

(D)启动redis服务

 (E)RedisController类

@RestController public class RedisController {   @Autowired  private StudentService studentService;     @GetMapping(value = "/springboot/allStudentCount")  public Object allStudentCount(httpservletRequest request) {   Long allStudentCount = studentService.queryAllStudentCount();   return "学生总人数:" + allStudentCount;  } } 

(F)StudentService 接口

public interface StudentService {     Long queryAllStudentCount(); } 

(G)在 StudentServiceImpl 中注入 RedisTemplate,并编写根据 id获取学生的方法

        配置了上面的步骤,Spring Boot 将自动配置 RedisTemplate,在需要操作 redis 的类中注入 redisTemplate 即可。 
        注意:Spring Boot 帮我们注入 RedisTemplate 类,泛型里面只能写 或者什么都不写。

@Service public class StudentServiceImpl implements StudentService {   @Autowired  private StudentMapper studentMapper;   @Autowired  private RedisTemplate redisTemplate;   @Override  public Long queryAllStudentCount() {   //设置 redisTemplate 对象 key 的序列化方式  redisTemplate.seTKEySerializer(new StringRedisSerializer());   //从 redis 缓存中获取总人数  Long allStudentCount = (Long) redisTemplate.opsForValue().get("allStudentCount");  //判断是否为空  if ( allStudentCount==null) {  //去数据库查询,并存放到 redis 缓存中   allStudentCount = studentMapper.selectAllStudentCount();  redisTemplate.opsForValue().set("allStudentCount",allStudentCount,15,TimeUnit.SECONDS);  }  return allStudentCount;  } } 

(H)StudentMapper 接口

@Mapperpublic interface StudentMapper {   Long selectAllStudentCount(); }

(I)StudentMapper 映射文件 

  

(J)启动类 Application

在 SpringBoot 启动类上添加扫描数据持久层的注解并指定扫描包:

@SpringBootApplication @MapperScan(basePackages = "com.abc.springboot.mapper")//扫描数据持久层 public class Application {   public static void main(String[] args) {  SpringApplication.run(Application.class, args);  }  } 

(K)让 Student 类实现序列化接口(可选)

在类名上 Alt + 回车,如果没有提示生成序列化 id,那么需要做如下的配置 :

 (L)启动 SpringBoot 应用,访问测试

来源地址:https://blog.csdn.net/friggly/article/details/123888590

--结束END--

本文标题: SpringBoot框架

本文链接: https://www.lsjlt.com/news/386093.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • SpringBoot框架
    目录  1.1 简介 1.2 特性 1.3 四大核心 2 springboot入门案例 2.1 SpringBoot 项目开发步骤  2.2  创建一个 Spring MVC 的 Spring BootController  2.3  分析...
    99+
    2023-08-31
    springboot mvc java spring boot restful
  • 什么是springboot框架
    小编给大家分享一下什么是springboot框架,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!什么是springboot框架springboot 是一个快速整合第...
    99+
    2023-06-02
  • java中的SpringBoot框架
    目录适合人群背景为什么不讲SpringSpringBoot是啥 项目搭建创建项目 & 配置依赖application.yml入口类控制器 Controller适合人群 学完J...
    99+
    2024-04-02
  • SpringBoot框架详细介绍
    目录 1.SpringBoot简介 2. 搭建springboot工程 3. 了解pom.xml以及配置文件 4. springboot的配置文件种类 5. java读取springboot配置文件的内容。 第一种: @Value读取 第二...
    99+
    2023-10-08
    spring boot java spring
  • Java框架入门之简单介绍SpringBoot框架
    前言 Spring都包含了哪些部分呢? 主要包含Spring Boot、Spring Framework、Spring Data、Spring Cloud、Spring Cloud ...
    99+
    2024-04-02
  • Java高级篇-----Springboot框架
    目录 1.什么是Springboot 2.Springboot框架的特点 3.创建Springboot工程 3.1.准备条件 3.2. 创建springboot的方式有两种 3.2.1. 使用idea快速创建 3.2.2. 基于maven的...
    99+
    2023-10-20
    java spring boot spring
  • springboot框架有哪些作用
    这篇“springboot框架有哪些作用”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“springboot框架有哪些作用”文...
    99+
    2023-06-08
  • springboot框架有什么优点
    springboot框架有简化项目配置、快速开发、微服务架构支持、自动装配、健康监测与管理、强大的社区支持和测试支持等优点。1、简化项目配置,通过自动配置的方式提供默认配置,减少了开发人员手动配置的工作量;2、快速开发,可以快速创建并部署应...
    99+
    2023-08-10
  • springboot框架中如何整合mybatis框架思路详解
    目录springboot框架中如何整合mybatis框架 一、在pom.xml 文件引入对应依赖二、写配置springboot框架中如何整合mybatis框架 思路: 1....
    99+
    2022-12-20
    springboot整合mybatis框架 springboot整合mybatis
  • eclipse如何搭建springboot框架
    要在Eclipse中搭建Spring Boot框架,可以按照以下步骤进行操作:1. 首先,确保已经安装了Java Developme...
    99+
    2023-10-08
    eclipse springboot
  • SpringBoot框架如何集成ElasticSearch
    这篇文章主要为大家展示了“SpringBoot框架如何集成ElasticSearch”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“SpringBoot框架如何集成ElasticSearch”这篇...
    99+
    2023-06-25
  • SpringBoot如何构建ORM框架
    本篇内容主要讲解“SpringBoot如何构建ORM框架”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“SpringBoot如何构建ORM框架”吧!目前常用的ORM框架有 Mybatis(bati...
    99+
    2023-06-29
  • SpringBoot怎么整合JPA框架
    这篇文章主要介绍了SpringBoot怎么整合JPA框架的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇SpringBoot怎么整合JPA框架文章都会有所收获,下面我们一起来看看吧。一. Spring Boot数...
    99+
    2023-07-04
  • SpringBoot框架如何整合SwaggerUI
    这篇文章主要介绍了SpringBoot框架如何整合SwaggerUI的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇SpringBoot框架如何整合SwaggerUI文章都会有所收获,下面我们一起来看看吧。整合s...
    99+
    2023-06-29
  • SpringBoot框架的MD5加密方式
    目录SpringBoot框架MD5加密导入相关依赖创建MD5工具类SpringBoot自带MD5加密总结SpringBoot框架MD5加密 一般来说,为了数据的安全性,需要对密码进行...
    99+
    2023-03-22
    SpringBoot框架 SpringBoot MD5加密 SpringBoot的MD5加密
  • SpringBoot框架搭建教程分享
    SpringBoot几乎集成了SpringMVC的所有内容,以及tomcat容器,同时去除了繁复的xml配置文件,开发起来十分方便;页面配合thymeleaf模板渲染也是非常简单,如果是前后端分离的项目,那么SpringBoot就专门负责提...
    99+
    2023-05-31
    springboot 框架
  • Springboot中如何集成Swagger2框架
    这篇文章给大家分享的是有关Springboot中如何集成Swagger2框架的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。摘要:在项目开发中,往往期望做到前后端分离,也就是后端开发人员往往需要输出大量的服务接口,...
    99+
    2023-05-30
    spring boot swagger2
  • SpringBoot框架如何管理Xml和CSV
    目录一、文档类型简介1、XML文档2、CSV文档二、XML文件管理1、Dom4j依赖2、基于API封装方法3、执行效果图三、CSV文件管理1、CSV文件样式2、文件读取3、文件创建4...
    99+
    2024-04-02
  • SpringBoot框架如何操作Excel和PDF
    目录一、文档类型简介1、Excel文档2、PDF文档二、Excel文件管理1、POI依赖2、文件读取3、文件创建4、文件导出5、文件导出接口三、PDF文件管理1、IText依赖2、A...
    99+
    2024-04-02
  • SpringBoot参数校验Validator框架详解
    目录SpringBoot 如何进行参数校验1.集成Validator校验框架1.1. 引入依赖包1.2. 定义要参数校验的实体类1.3. 定义校验类进行测试1.4. 测试结果11.5...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作