04 2021 档案

摘要:select单条数据 package entity; public class User { private Integer id; private String username; private Integer age; private Integer score;}package dao; p 阅读全文
posted @ 2021-04-14 21:37 至安望月 阅读(110) 评论(0) 推荐(0)
摘要:什么是Mapper drop database if exists mybatis_demo;create database mybatis_demo;use mybatis_demo;create table user ( id int auto_increment primary key, us 阅读全文
posted @ 2021-04-14 21:29 至安望月 阅读(218) 评论(0) 推荐(0)
摘要:引入IOC之前 代码实现 package entity;public class User { private Integer id; private String name; private Integer gender; // 省略getter&setter方法}package vo; publ 阅读全文
posted @ 2021-04-14 21:03 至安望月 阅读(59) 评论(0) 推荐(0)
摘要:集成Spring框架 <?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XM 阅读全文
posted @ 2021-04-10 15:42 至安望月 阅读(60) 评论(0) 推荐(0)
摘要:搭建配置SpringMVC 引入依赖 <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version> <scope>test</scope> < 阅读全文
posted @ 2021-04-05 13:41 至安望月 阅读(49) 评论(0) 推荐(0)
摘要:public class Test { /** * for循环打印List中的值 * * @param list */ private static void printFor(List<String> list) { System.out.println(" for循环开始 "); for (in 阅读全文
posted @ 2021-04-05 13:33 至安望月 阅读(2642) 评论(0) 推荐(0)
摘要:JDBC连接及操作数据库 引入MySQL驱动包 <dependencies> <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> <dependency> <groupId>mysql</groupId> <a 阅读全文
posted @ 2021-04-05 13:27 至安望月 阅读(42) 评论(0) 推荐(0)