前言 在上一篇SpringIOC入门中我们介绍了SpringIOC的基本使用,现在我们更加深入的学习一下SpringIOC。 一、Bean的相关配置 在前文我们简单了解了bean的使用,下面我们再来具体介绍一下bean。 1.名称与标识 id: 使用了约束中的唯一约束。里面不能出现特殊字符的 nam ...
分类:
编程语言 时间:
2020-06-29 11:39:43
阅读次数:
45
使用serializer.save()的mixin,CreateModelMixin处理post请求,UpdateModelMixin处理put,patch请求,这里可以看到create方法,get_serializer()创建序列化实例时,只是传入request.data浏览器发送过来的数据,Up ...
分类:
其他好文 时间:
2020-06-29 00:27:20
阅读次数:
149
1. 内容回顾 1. 昨日问题 1. request.GET(编辑功能) request.GET是取URL里面的参数,和什么请求是没关系的。 2. ORM取数据 类名.objects.all() 类名.objects.get(条件) --> 有且只能找到一个 类名.objects.filter(条件 ...
分类:
其他好文 时间:
2020-06-28 22:34:44
阅读次数:
75
max.poll.interval.ms参数用于指定consumer两次poll的最大时间间隔(默认5分钟),如果超过了该间隔consumer client会主动向coordinator发起LeaveGroup请求,触发rebalance;然后consumer重新发送JoinGroup请求 示例如下 ...
分类:
其他好文 时间:
2020-06-28 22:18:58
阅读次数:
547
名称: 命令模式(Command Pattern) 问题: The Command pattern encapsulates a request in an object, which enables you to store the command, pass the command to a m ...
分类:
其他好文 时间:
2020-06-28 22:12:34
阅读次数:
80
事情是这样的,今天安装 prepack-webpack-plugin 出现了 node-pre-gyp WARN Using request for node-pre-gyp https download ,导致一直安装不上,然后我就去找了 node-gpy 是啥,结果发现,它是和二进制编译相关的, ...
分类:
其他好文 时间:
2020-06-28 20:59:25
阅读次数:
71
环境搭建参考:https://www.jianshu.com/p/fc39030d057f 总体流程: ...
分类:
其他好文 时间:
2020-06-28 20:15:34
阅读次数:
39
org.springframework.web.context.request.RequestContextHolderorg.springframework.web.context.request.RequestAttributesorg.springframework.web.context.r ...
分类:
编程语言 时间:
2020-06-28 18:20:57
阅读次数:
149
每日思考一遍人生,还是要学习的 0x01 web 1、计算器-1 源码: 1 #!/usr/bin/env python3 2 # -*- coding: utf-8 -*- 3 from flask import Flask, render_template, request,session 4 ...
分类:
其他好文 时间:
2020-06-28 15:19:09
阅读次数:
51
1.asp.net core 实际是一个控制台应用程序 。请求管道模型 执行顺序就是:发送http请求>被Kestrel解析得到HttpContext->然后被后台代码处理Request>返回Response->经由Kestrel回发到客户端所谓管道,就是拿着HttpContext,经过多个步骤的加 ...
分类:
Web程序 时间:
2020-06-28 12:53:49
阅读次数:
85