摘要: /** * 将localDateTime 转为 date */ public static Date localDateTime2Date(LocalDateTime localDateTime) { ZonedDateTime zonedDateTime = localDateTime.atZon 阅读全文
posted @ 2021-07-05 16:09 哈尔的卡西法 阅读(509) 评论(0) 推荐(0)
摘要: Student s1 = new Student("aa", 10,1); Student s2 = new Student("bb", 20,2); Student s3 = new Student("cc", 10,3); List<Student> list = Arrays.asList(s 阅读全文
posted @ 2021-07-05 11:34 哈尔的卡西法 阅读(168) 评论(0) 推荐(0)
摘要: Java时间格式转换大全 import java.text.*; import java.util.Calendar; public class VeDate { /** * 获取现在时间 * * @return 返回时间类型 yyyy-MM-dd HH:mm:ss */ public static 阅读全文
posted @ 2021-06-30 17:21 哈尔的卡西法 阅读(1730) 评论(0) 推荐(0)
摘要: private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); @Test public void test_getMonthFullDay(){ System.out.println(getMonthFullDay 阅读全文
posted @ 2021-06-30 17:17 哈尔的卡西法 阅读(111) 评论(0) 推荐(0)
摘要: StringBuilder转化为String String str = "abcdefghijklmnopqrs"; StringBuilder stb = new StringBuilder(str); 整型数组转化为字符串 StringBuilder s = new StringBuilder( 阅读全文
posted @ 2021-06-29 17:16 哈尔的卡西法 阅读(210) 评论(0) 推荐(0)
摘要: 1、select 元素有很多属性允许你配置,来决定每条语句的作用细节。 <select id=”selectPerson” 在命名空间中唯一的标识符,可以被用来引用这条语句。 parameterType=”int” 将会传入这条语句的参数类的完全限定名或别名。 parameterMap=”depre 阅读全文
posted @ 2021-06-20 12:09 哈尔的卡西法 阅读(164) 评论(0) 推荐(0)
摘要: @Insert : 插入sql , 和xml insert sql语法完全一样@Select : 查询sql, 和xml select sql语法完全一样@Update : 更新sql, 和xml update sql语法完全一样@Delete : 删除sql, 和xml delete sql语法完 阅读全文
posted @ 2021-06-20 11:58 哈尔的卡西法 阅读(66) 评论(0) 推荐(0)
摘要: {}是预编译处理,${}是字符串替换 mybatis在处理#{}时,会将sql中的#{}替换为?号,调用PreparedStatement的set方法来赋值;mybatis在处理${}时,就是把${}替换成变量的值 使用#{}可以有效的防止SQL注入,提高系统安全性 例如:所以通常情况下,使用#{} 阅读全文
posted @ 2021-06-20 11:54 哈尔的卡西法 阅读(124) 评论(0) 推荐(0)
摘要: 请求路径上的区别:很明显一个是 https:url ?键值对,一个是https:url /参数 ,区别很明显 @PathVariable[ˈveəriəbl]主要用于接收http://host:port/path/{参数值}数据。@RequestParam主要用于接收http://host:port 阅读全文
posted @ 2021-06-20 11:38 哈尔的卡西法 阅读(238) 评论(0) 推荐(0)
摘要: @SpringBootApplication:申明让spring boot自动给程序进行必要的配置,这个配置等同于: @Configuration ,@EnableAutoConfiguration 和 @ComponentScan 三个配置。 @ResponseBody:表示该方法的返回结果直接写 阅读全文
posted @ 2021-06-20 11:28 哈尔的卡西法 阅读(95) 评论(0) 推荐(0)