分页查询对比正常的查询差别不大,只是在sql语句上有区别 userMapper.class文件 //limit分页List<User> limit(Map<String,Integer> map); User mapper.xml 文件下映射对应文件 <select id="limit" param ...
分类:
其他好文 时间:
2020-07-05 17:42:32
阅读次数:
86
包装类 装箱和拆箱 示例代码: public class Demo2 { public static void main(String[] args) { //JDK1.5之前 //1.装箱操作,基本类型转为引用类型的过程 int num1 = 18; //基本类型数据 //使用Integer类创建 ...
分类:
其他好文 时间:
2020-07-05 15:44:16
阅读次数:
58
Integer整数缓冲区 示例代码: public class Demo2 { public static void main(String[] args) { //面试题 Integer integer1 = new Integer(100); Integer integer2 = new Int ...
分类:
其他好文 时间:
2020-07-05 15:37:30
阅读次数:
58
一.对象类 @Data @AllArgsConstructor public class User { private Integer age; private String name; } 二.普通写法 private List<User> users =Arrays.asList(new Use ...
分类:
编程语言 时间:
2020-07-05 15:07:27
阅读次数:
252
paper.jsp: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" p ...
分类:
其他好文 时间:
2020-07-05 10:49:06
阅读次数:
76
springmvc的参数绑定有以下几种方法: 1)默认的参数绑定 Request Response Session Model(实现ModelMap) 2)简单类型参数绑定 方法的形参上(Integer id,String,Double,Boolean) 3)pojo类型 4)包装类型 QueryV ...
分类:
编程语言 时间:
2020-07-05 00:23:48
阅读次数:
73
public List<List<Integer>> threeSum(int[] nums) { List<List<Integer>> result = new ArrayList<>(); if(nums.length < 3)return result; Arrays.sort(nums); ...
分类:
其他好文 时间:
2020-07-04 22:39:06
阅读次数:
63
给定一个只包含 '(' 和 ')' 的字符串,找出最长的包含有效括号的子串的长度。 示例 1: 输入: "(()"输出: 2解释: 最长有效括号子串为 "()"示例 2: 输入: ")()())"输出: 4解释: 最长有效括号子串为 "()()" 链接:https://leetcode-cn.com ...
分类:
其他好文 时间:
2020-07-04 20:26:33
阅读次数:
49
Description Given an array of integers cost and an integer target. Return the maximum integer you can paint under the following rules: The cost of pai ...
分类:
其他好文 时间:
2020-07-04 16:59:34
阅读次数:
73
1th 两数之和 暴力枚举法 直接两重循环暴力枚举,很慢。 class Solution { public int[] twoSum(int[] nums, int target) { int[] ans = new int[2]; for(int i = 0; i < nums.length; i ...
分类:
其他好文 时间:
2020-07-04 14:59:09
阅读次数:
48