上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: 第一步:maven依赖搭建,同时把build内容加上。避免后期丢失的问题 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w 阅读全文
posted @ 2023-03-10 13:31 Rui2022 阅读(13) 评论(0) 推荐(0) 编辑
摘要: package JavaSE.Lesson18; import java.io.FileReader; import java.io.IOException; public class ReaderDemo02 { public static void main(String[] args) { S 阅读全文
posted @ 2023-03-03 21:56 Rui2022 阅读(10) 评论(0) 推荐(0) 编辑
摘要: package JavaSE.Lesson18; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class ReaderDemo { public 阅读全文
posted @ 2023-03-03 21:56 Rui2022 阅读(8) 评论(0) 推荐(0) 编辑
摘要: package JavaSE.Lesson18; import java.io.FileWriter; import java.io.IOException; public class FileWriterDemo01 { public static void main(String[] args) 阅读全文
posted @ 2023-03-03 21:53 Rui2022 阅读(12) 评论(0) 推荐(0) 编辑
摘要: public class FileLoad extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, 阅读全文
posted @ 2023-02-28 22:43 Rui2022 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1、db.properties 文件中读取 username 和 password 2、getResourceAsStream ("/web-inf/classes/db.properties") 3、properties.getProperty("username") public class D 阅读全文
posted @ 2023-02-27 21:48 Rui2022 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 避免Sql注入的问题。 不用Statement 而用PrepareStatement 预编译 然后手工赋值 setInt or setString 插入: public class TestInsert { public static void main(String[] args) { Conne 阅读全文
posted @ 2023-02-25 11:17 Rui2022 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1、配置资源文件 .properties (driver, url,username,password) 便于后期更改 driver=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/shop?useUnicode=true&characte 阅读全文
posted @ 2023-02-25 10:28 Rui2022 阅读(16) 评论(0) 推荐(0) 编辑
摘要: public class jdbcStudy { public static void main(String[] args) throws ClassNotFoundException, SQLException { //1.加载驱动,加载之前要把mysql-connector-java.jar包 阅读全文
posted @ 2023-02-25 09:21 Rui2022 阅读(13) 评论(0) 推荐(0) 编辑
摘要: idea中各种for循环的快捷键 使用Intellij idea 时,想要快捷生成for循环代码块 itar 生成array for代码块 for (int i = 0; i < array.length; i++) { = array[i]; }123 itco 生成Collection迭代 fo 阅读全文
posted @ 2023-02-20 20:12 Rui2022 阅读(301) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页