springboot
文章平均质量分 51
jacky 郑
精益求精
展开
-
springboot+mybatis+操作记录
springboot+mybatisspringboot 随意2.0以上版本1.配置mybatis依赖POM.XML<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.1</version> </dep原创 2021-08-10 16:37:09 · 199 阅读 · 0 评论 -
JDK8 STEAM操作记录
JDK8 STREAM 使用技巧Stream(流)是一个来自数据源的元素队列并支持聚合操作元素是特定类型的对象,形成一个队列。 Java中的Stream并不会存储元素,而是按需计算。数据源 流的来源。 可以是集合,数组,I/O channel, 产生器generator 等。聚合操作 类似SQL语句一样的操作, 比如filter, map, reduce, find, match, sorted等。和以前的Collection操作不同, Stream操作还有两个基础的特征:Pipelining:原创 2021-07-04 09:53:57 · 66 阅读 · 0 评论 -
springboot多配置文件配置测试
yml格式写法主配置文件server: port: 8090spring: profiles: active: test从配置文件spring: datasource: driver-class-name: oracle.jdbc.OracleDriver url: url username: xxxx password: xxxxx mybatis: mapperLocations: cl原创 2021-06-08 10:05:30 · 224 阅读 · 0 评论 -
AJAX请求@RequestParam与@RequestBody接收参数
SrpingBoot与SpringMvc框架接受页面AJAX请求方式记录一、当页面请求AJAX使用JSON格式发请求后台,如下代码var reqMap = {}; reqMap.gsid = gsid; reqMap.xlid = xlid;$.ajax({ url : zd_basePath + '/queryXljczc', type : 'POST', dataType : 'json', data :JSON.s原创 2021-03-22 17:30:21 · 2334 阅读 · 0 评论 -
实现springBoot单元测试
[1.测试业务层数据库交互数据进行单元测试;2.直接配置入口程序类进入注解中TeacherApplication,就能加载程序的application.properties文件。@RunWith(SpringJUnit4ClassRunner.class)@SpringBootTest(classes = {TeacherApplication.class}, webEnvironment...原创 2019-05-06 17:01:12 · 360 阅读 · 0 评论 -
SpringBoot的Classes
// 方法1:获取文件或流this.getClass().getResource("/")+fileName;this.getClass().getResourceAsStream(failName);// 方法2:获取文件File file = org.springframework.util.ResourceUtils.getFile("classpath:test.txt");//...原创 2019-06-10 11:15:31 · 807 阅读 · 0 评论 -
springboot 配置使用百度的文件上传webuploader
配置上传文件的部分:如果想实现百度的webupload 文件分片上传功能需要禁用这些spring.servlet.multipart.enabled=truespring.servlet.multipart.max-file-size=1000Mbspring.servlet.multipart.max-request-size=1000Mb...原创 2019-07-08 16:32:22 · 237 阅读 · 0 评论