This commit is contained in:
2025-08-04 09:29:27 +08:00
parent a826d55b54
commit e641970377
5 changed files with 86 additions and 38 deletions

View File

@@ -254,32 +254,6 @@
" */\n",
]
},
"JavaDoc for class": {
"scope": "java",
"prefix": "javadoc-class",
"body": [
"/**",
" * ${1:$TM_FILENAME_BASE}",
" *",
" * <p>",
" * ${2:description}",
" * </p>",
" *",
" * <p>",
" * <b>NOTE: ${3:content}.</b>",
" * </p>",
" * @author ${4:<a href=\"${5:http://zhouxy.xyz:3000/ZhouXY108}\">${6:ZhouXY}</a>}",
" * @since $7",
" * @see $8",
" */",
],
"description": "JavaDoc for class"
},
"inheritDoc": {
"scope": "java",
"prefix": ["javadoc-inheritDoc", "doc-inheritDoc"],
"body": "/** {@inheritDoc} */"
},
"Jdbc Template": {
"scope": "java",
"prefix": "jdbc",

View File

@@ -2,8 +2,52 @@
"code": {
"prefix": "@code",
"body": [
"{@code $TM_SELECTED_TEXT}"
"{@code ${1:$TM_SELECTED_TEXT}}"
],
"scope": "java"
}
}
},
"link": {
"prefix": "@link",
"body": [
"{@link ${1:$TM_SELECTED_TEXT}}"
],
"scope": "java"
},
"author": {
"prefix": ["@author", "@auth"],
"body": [
"@author ${1:ZhouXY108}${2: <${3:luquanlion@outlook.com}>}"
],
},
"JavaDoc for class": {
"scope": "java",
"prefix": [
"javadoc-class",
"doc-class"
],
"body": [
"/**",
" * ${1:$TM_FILENAME_BASE}",
" *",
" * <p>",
" * ${2:description}",
" *",
" * <p>",
" * <b>NOTE: ${3:content}.</b>",
" *",
" * @author ${4:ZhouXY108}${5: <${6:luquanlion@outlook.com}>}",
" * @since $7",
" * @see $8",
" */",
],
"description": "JavaDoc for class"
},
"inheritDoc": {
"scope": "java",
"prefix": [
"javadoc-inheritDoc",
"doc-inheritDoc"
],
"body": "/** {@inheritDoc} */"
},
}

30
jspecify.code-snippets Normal file
View File

@@ -0,0 +1,30 @@
{
"Import all JSpecify annotations": {
"scope": "java",
"prefix": "jspecify-import-all",
"body": [
"import org.jspecify.annotations.*;",
""
],
"description": "import all JSpecify annotations"
},
"Import JSpecify annotations": {
"scope": "java",
"prefix": "jspecify-import",
"body": [
"import org.jspecify.annotations.Nullable;",
"import org.jspecify.annotations.NonNull;",
""
],
"description": "import JSpecify annotations"
},
"Import JSpecify annotations (Nullable)": {
"scope": "java",
"prefix": "jspecify-import-nullable",
"body": [
"import org.jspecify.annotations.Nullable;",
""
],
"description": "import JSpecify annotations (nullable)"
},
}

View File

@@ -267,7 +267,7 @@
"/**",
" * Entity 和 Info 的父类",
" * ",
" * @author ZhouXY",
" * @author ZhouXY108 <luquanlion@outlook.com>",
" */",
"public abstract class BaseDomain implements Serializable {",
"\tprotected Long id;",
@@ -304,7 +304,7 @@
"/**",
" * ${5:ModuleShortName}${7:Entity} 的基本属性",
" * ",
" * @author ZhouXY",
" * @author ZhouXY108 <luquanlion@outlook.com>",
" */",
"public class ${5:ModuleShortName}${7:Entity}Info extends BaseDomain {",
"\tprivate String username;",
@@ -352,7 +352,7 @@
"/**",
" * 查询参数的基本属性",
" * ",
" * @author ZhouXY",
" * @author ZhouXY108 <luquanlion@outlook.com>",
" */",
"public abstract class BaseQueryParams {",
"\tprotected Long id;",
@@ -383,7 +383,7 @@
"/**",
" * ${5:ModuleShortName}${7:Entity} 的查询参数",
" * ",
" * @author ZhouXY",
" * @author ZhouXY108 <luquanlion@outlook.com>",
" */",
"public class ${5:ModuleShortName}${7:Entity}Query extends BaseQueryParams {",
"\tprivate String email;",
@@ -407,7 +407,7 @@
"/**",
" * ${5:ModuleShortName}${7:Entity} 实体",
" *",
" * @author ZhouXY",
" * @author ZhouXY108 <luquanlion@outlook.com>",
" */",
"public class ${5:ModuleShortName}${7:Entity} extends BaseDomain {",
"\tprivate String username;",
@@ -533,7 +533,7 @@
"/**",
" * BaseEntityBuilder",
" * ",
" * @author ZhouXY",
" * @author ZhouXY108 <luquanlion@outlook.com>",
" */",
"public abstract class BaseEntityBuilder<E extends BaseDomain> {",
"",

View File

@@ -123,19 +123,19 @@
"<dependency>",
"\t<groupId>org.junit.jupiter</groupId>",
"\t<artifactId>junit-jupiter-api</artifactId>",
"\t<version>5.12.2/version>",
"\t<version>5.12.2</version>",
"\t<scope>test</scope>",
"</dependency>",
"<dependency>",
"\t<groupId>org.junit.jupiter</groupId>",
"\t<artifactId>junit-jupiter-engine</artifactId>",
"\t<version>5.12.2/version>",
"\t<version>5.12.2</version>",
"\t<scope>test</scope>",
"</dependency>",
"<dependency>",
"\t<groupId>org.junit.jupiter</groupId>",
"\t<artifactId>junit-jupiter-params</artifactId>",
"\t<version>5.12.2/version>",
"\t<version>5.12.2</version>",
"\t<scope>test</scope>",
"</dependency>",
]