<%--
Created by IntelliJ IDEA.
User: admin
Date: 2019/8/30
Time: 9:02
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri ="http://java.sun.com/jsp/jstl/core"%>
Title
<%----%>
5)controller 类
@RequestMapping(value = "/getExcelData", method = RequestMethod.POST)
public String getExcelData(MultipartFile myfile, Model model) {
try {
List> lists = ExcelUtil.getUserListByExcel(myfile.getInputStream(), myfile.getOriginalFilename());
//List>--->List
List users = new ArrayList<>();
//
for (int i = 0; i < lists.size(); i++) {
UserInfo user = new UserInfo();
List ob = lists.get(i);//List
user.setId(Integer.parseInt(ob.get(0).toString()));//"1"
user.setUsername(ob.get(1).toString());
//ob.get(4).toString();//Object-->String("2019-08-30 12:12:12")--->Date
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
System.out.println("1111111111111111111"+ob.get(4).toString());
Date time = sdf.parse(ob.get(4).toString());
user.setCreatedate(time);
users.add(user);
}
//插入数据
userInfoService.insert(users);
} catch (Exception e) {
e.printStackTrace();
}
UserInfoExample userExample = new UserInfoExample();
List allusers = userInfoService.selectByExample(userExample);
model.addAttribute("all", allusers);
return "display";
}
Annotation: 译为注释或注解
An annotation, in the Java computer programming language, is a form of syntactic metadata that can be added to Java source code. Classes, methods, variables, pa
定义:pageStart 起始页,pageEnd 终止页,pageSize页面容量
oracle分页:
select * from ( select mytable.*,rownum num from (实际传的SQL) where rownum<=pageEnd) where num>=pageStart
sqlServer分页:
 
hello.hessian.MyCar.java
package hessian.pojo;
import java.io.Serializable;
public class MyCar implements Serializable {
private static final long serialVersionUID = 473690540190845543
回顾简单的数据库权限等命令;
解锁用户和锁定用户
alter user scott account lock/unlock;
//system下查看系统中的用户
select * dba_users;
//创建用户名和密码
create user wj identified by wj;
identified by
//授予连接权和建表权
grant connect to
/*
*访问ORACLE
*/
--检索单行数据
--使用标量变量接收数据
DECLARE
v_ename emp.ename%TYPE;
v_sal emp.sal%TYPE;
BEGIN
select ename,sal into v_ename,v_sal
from emp where empno=&no;
dbms_output.pu
public class IncDecThread {
private int j=10;
/*
* 题目:用JAVA写一个多线程程序,写四个线程,其中二个对一个变量加1,另外二个对一个变量减1
* 两个问题:
* 1、线程同步--synchronized
* 2、线程之间如何共享同一个j变量--内部类
*/
public static