diff --git a/src/main/java/org/apache/ibatis/annotations/Select.java b/src/main/java/org/apache/ibatis/annotations/Select.java index e4488bc66a7..f6347adc987 100644 --- a/src/main/java/org/apache/ibatis/annotations/Select.java +++ b/src/main/java/org/apache/ibatis/annotations/Select.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2023 the original author or authors. + * Copyright 2009-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,33 +26,33 @@ * The annotation that specify an SQL for retrieving record(s). *
* How to use:
- *
+ *
*
- * public interface UserMapper { - * @Select("SELECT id, name FROM users WHERE id = #{id}") - * User selectById(int id); - * } - *- *
- * public interface UserMapper { - * @Select({"<script>", - * "select * from users", - * "where name = #{name}", - * "<if test=\"age != null\"> age = #{age} </if>", - * "</script>"}) - * User select(@NotNull String name, @Nullable Intger age); - * } - *- *
{@code + * public interface UserMapper { + * @Select("SELECT id, name FROM users WHERE id = #{id}") + * User selectById(int id); + * } + * }+ * + *
{@code + * public interface UserMapper { + * @Select({ "" }) + * User select(@NotNull String name, @Nullable Intger age); + * } + * }+ * + *