摘要:
package com.lyc;import java.util.Scanner;public class Demo02 { public static void main(String[] args) { //创建一个扫描对象,用于接收键盘数据 Scanner scanner = new Scan
阅读全文
posted @ 2021-01-05 21:35
liuyunche
阅读(82)
推荐(0)
摘要:
package com.lyc;import java.util.Scanner;public class Demo01 { public static void main(String[] args) { //创建一个扫描对象,用于接收键盘数据 Scanner scanner = new Scan
阅读全文
posted @ 2021-01-05 21:28
liuyunche
阅读(72)
推荐(0)
摘要:
在resources中创建 New -> XMLConfiguration File -> SpringConfig -> beans.xml先编写一个普通类: package com.by; public class HelloWord { private String message; publ
阅读全文
posted @ 2021-01-04 16:47
liuyunche
阅读(65)
推荐(0)
摘要:
package cn.Dbutils;import java.io.*;public class As { static int num = 0; static int c =0; public static void main(String[] args) { String per = "e/";
阅读全文
posted @ 2020-12-21 15:18
liuyunche
阅读(298)
推荐(0)
摘要:
package jdbc;import org.junit.Test;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;import java.util.Collection;p
阅读全文
posted @ 2020-12-17 09:56
liuyunche
阅读(59)
推荐(0)
摘要:
package jdbc;import java.sql.*;public class Test2 { public static void main(String[] args) throws ClassNotFoundException, SQLException { //配置信息 //useU
阅读全文
posted @ 2020-12-16 21:29
liuyunche
阅读(267)
推荐(0)
摘要:
/* 1加载驱动2连接数据库3向数据库发送sql的对象Statement : CRUD4编写sql5执行查询sql ,返回一个resultSet : 结果集6关闭连接,释放资源(一定要做)先开后关 *//*首先添加数据库依赖<!--mysql的驱动--><dependency> <groupId>m
阅读全文
posted @ 2020-12-16 20:55
liuyunche
阅读(101)
推荐(0)
摘要:
package cn.lyc.listener;import java.awt.*;import java.awt.event.WindowAdapter;import java.awt.event.WindowEvent;import java.awt.event.WindowListener;p
阅读全文
posted @ 2020-12-15 20:56
liuyunche
阅读(65)
推荐(0)
摘要:
/* 在web.xml文件中注册监听器 <listener> <listener-class>cn.lyc.listener.OnlineCountListener</listener-class> </listener> */ package cn.lyc.listener; import jav
阅读全文
posted @ 2020-12-15 20:30
liuyunche
阅读(456)
推荐(0)
摘要:
/* 过滤器有三个方法首先创建一个类继承Filter(必须继承java.servlet.*包下的)1.初始化 //初始化 public void init(FilterConfig filterConfig) throws ServletException { System.out.println(
阅读全文
posted @ 2020-12-15 20:21
liuyunche
阅读(125)
推荐(0)