- 博客(9)
- 收藏
- 关注
原创 Asp.net core前后台交互
当前台传参为Requset Payload时:后台需要在参数列表中加[FromBody][Route("/create"))] public string Create([FromBody] Model model) { }或者用流来进行接收using (var bufferStream = new MemoryStream()) { Request.Body.Co...
2019-12-15 14:38:31
1382
原创 SpringBoot前后端的Json交互
前端利用ajax:var sData = { email: $("#exampleInputEmail1").val(), password: $("#exampleInputPassword1").val() };$.ajax({ url: "/login", type: 'post', dataType: 'json...
2019-03-14 15:25:04
978
原创 Spring使用JdbcTemplate操作数据库
首先配置连接数据库的propertiesjdbc.user=rootjdbc.password=1230jdbc.driverClass=com.mysql.cj.jdbc.Driverjdbc.jdbcUrl=jdbc:mysql:///springjdbc.initPoolSize=5jdbc.maxPoolSize=10本例使用c3p0连接池。然后配置spring的...
2019-02-24 13:40:37
148
原创 Java关于时间的处理(Date,SimpleDateFormat)
Date表示时刻,内部主要是一个long型的值,如下private transient long fastTime;//fastTime表示的是距离纪元1900年1月1日0时0分0秒的毫秒数Date有两个构造方法: public Date() { this(System.currentTimeMillis()); }//默认构造方法,根据System.cur...
2019-02-18 23:55:19
307
原创 windows10安装MySQL5.7压缩免安装版
首先在官网下载指定版本:https://dev.mysql.com/downloads/mysql/下载压缩版的,解压到你指定的目录。目录结构为:可以看到没有data目录和ini配置文件。这时新建my.ini,内容为[mysqld]port = 3306basedir=D:\mysql-5.7.21-winx64datadir=D:\mysql-5.7.21-winx6...
2019-01-03 14:32:27
220
原创 SpringBoot 访问出现html页面出现Whitelabel Error Page(404错误)
首先这是个项目已经成功启动的标志,只是无法根据地址访问到指定的资源。出现的原因可能是:Controller无法被扫描到。SpringBoot自动扫描启动类的同包或者其子包下的注解,需要将项目结构改成这样的或者在启动类中加Component注解。 @SpringBootApplication@ComponentScan("controller")//扫描Controller包以及其...
2019-01-02 15:04:22
12757
1
原创 甲级1006 Sign In and Sign Out
1006 Sign In and Sign Out (25 分)At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the reco...
2018-12-06 17:20:24
131
原创 甲级1001 A+B Format (20 分)
1001 A+B Format (20 分)Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Spe...
2018-12-04 21:48:52
120
原创 快速排序(QuickSort)的java实现
1.快速排序是基于分治法的一个排序算法,此外还有合并排序(MergeSort)也是基于分治法,基本思想为:对于输入的数组a[p:r],按照三个步骤进行排序。①将数组划分为三个部分及a[p,q-1],a[q],a[q+1,r],q在过程中确定,如何确定q是快速排序的关键。②递归调用快速排序算法对分解出来的a[p,q-1],a[q+1,r]进行排序。③回到原数组,每个子数组已经排好序,即原
2017-11-13 11:06:28
303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人