java
温暖的阳光️
(知识来源于生活,又为生活所服务)好好学习,每天进步一点点,加油
展开
-
自定义异常,try,catch,throw,throws明了讲解
自定义异常,这个搞懂了就知道什么时候catch什么时候throw,什么时候throws/* 自定义“无效名字异常”. 1.编译时异常,直接继承Exception 2.运行时异常,直接继承RuntimeException*/public class IllegalNameException extends Exception{ //编译时异常//public class IllegalNameException extends RuntimeException{ //运.原创 2021-06-16 22:16:19 · 210 阅读 · 0 评论 -
@Param注解
1,使用@Param注解当以下面的方式进行写SQL语句时:@Select("select column from table where userid = #{userid} ")public int selectColumn(int userid);当你使用了使用@Param注解来声明参数时,如果使用 #{} 或 ${} 的方式都可以。@Select("select column from table where userid = ${userid} ")public int selectC原创 2021-01-06 19:22:05 · 125 阅读 · 0 评论