摘要: mybatis动态代理: 1、创建(UserMapper)Mapper接口,创建相同名称Mapper.xml映射文件,并且保证映射文件和Mapper接口在同一路径下 2、Mapper.xml映射文件的命名空间和接口的全路径一致 <mapper namespace="com.mapper.UserMa 阅读全文
posted @ 2023-09-18 11:42 OYそ 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 什么是MyBatis? MyBatis 是一款优秀的持久层框架,用于简化 JDBC 开发 MyBatis 本是 Apache 的一个开源项目iBatis, 2010年这个项目由apache software foundation 迁移到了google code,并且改名为MyBatis 。2013年 阅读全文
posted @ 2023-09-18 11:17 OYそ 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 302 302 Found是HTTP协议中的一个状态码(Status Code),可以简单的理解为该资源原本确实存在,但已经被临时改变了位置; 或者换个说法,就是临时的存在于某个临时URL下。通常会发送Header来暂时重定向到新的新位置。 问题原因 本地debug发现后端没有报错,看前后端接口时, 阅读全文
posted @ 2023-09-13 10:58 OYそ 阅读(49) 评论(0) 推荐(0) 编辑
摘要: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 阅读全文
posted @ 2023-09-04 11:19 OYそ 阅读(83) 评论(0) 推荐(0) 编辑
摘要: jstl.jsp <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%--if--%> 阅读全文
posted @ 2023-08-29 11:37 OYそ 阅读(13) 评论(0) 推荐(0) 编辑
摘要: eljstl.jsp <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>Title</title> </head> <body> <h1>首页</h1> <%--指令包含<%@ 阅读全文
posted @ 2023-08-29 11:17 OYそ 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 消费者 consumer ``` import org.junit.Test; import java.util.function.Consumer; public class consumer { public void test02(Consumer consumer){ consumer.ac 阅读全文
posted @ 2023-08-08 11:18 OYそ 阅读(1) 评论(0) 推荐(0) 编辑
摘要: package com.example.de1; import org.junit.Test; import java.sql.*; public class jdbc { private static final String url = "jdbc:mysql://127.0.0.1:3307/ 阅读全文
posted @ 2023-08-01 09:37 OYそ 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1. 查询emp表薪水降序排序后的第5-9条数据 2. 创建序列 3. 建表toys,调用序列的nextval方法实现id自增。添加数据 阅读全文
posted @ 2023-07-31 11:28 OYそ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: ORCL单仓库,多用户 sys是超级管理员,主要用来维护系统信息和管理实例。不知密码也可以本机登录(远程需要),只能使用SYSDBA或SYSOPER角色登录 system是系统管理员,拥有DBA权限,通常用来管理oracle数据库的用户、权限和存储等。只能用NORMAL方式登录。需要oracle安装 阅读全文
posted @ 2023-07-31 10:30 OYそ 阅读(8) 评论(0) 推荐(0) 编辑
摘要: -- 升序 SELECT * FROM emp ORDER BY sal ASC; -- 降序 SELECT * FROM emp ORDER BY sal DESC; -- 输出comm字段为null的记录 SELECT * FROM emp WHERE comm IS NULL; -- 输出co 阅读全文
posted @ 2023-07-25 11:12 OYそ 阅读(33) 评论(0) 推荐(0) 编辑
摘要: DROP TABLE IF EXISTS student; -- not null 非空teststudent -- default 有默认值 -- unique 唯一 -- primary key 主键 一张表只有一个主键,默认不为空 -- auto_increment 自增长,必须是数字 CRE 阅读全文
posted @ 2023-07-24 11:37 OYそ 阅读(35) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) throws ParseException { Date date1 = new Date(); //now Date date2 = new Date(0); //计算机元年 Date date3 = new Date( 阅读全文
posted @ 2023-07-14 16:10 OYそ 阅读(29) 评论(0) 推荐(0) 编辑
摘要: @Test public void f() { String s1 = "a"; String tmp = s1; s1 += "b"; System. out. println(tmp); //a System. out. println(s1) ; //ab } @Test public voi 阅读全文
posted @ 2023-07-13 16:54 OYそ 阅读(3) 评论(0) 推荐(0) 编辑
摘要: public class Demo05 { public static void main(String[] args) { Scanner in = new Scanner(System.in); // 一旦发生异常,产生异常对象,抛给虚拟机JVM,JVM中止后面的代码。将异常信息全部打印到控制台 阅读全文
posted @ 2023-07-13 16:29 OYそ 阅读(2) 评论(0) 推荐(0) 编辑