Bean Registrar validation preference setting

This commit is contained in:
aboyko
2025-03-28 17:23:28 -04:00
parent 98a5992e43
commit d89fd1454e
3 changed files with 69 additions and 15 deletions

View File

@@ -123,6 +123,29 @@
}
]
},
{
"id": "boot4",
"label": "Boot 4.x Best Practices & Optimizations",
"toggle": {
"label": "Enablement",
"values": [
"AUTO",
"OFF",
"ON"
],
"preferenceKey": "boot-java.validation.java.boot4",
"defaultValue": "AUTO"
},
"order": 3,
"problemTypes": [
{
"code": "REGISTRAR_BEAN_DECLARATION",
"label": "Not registered via `@Import` in a configuration bean",
"description": "Bean derived from BeanRegistrar should be registered via `@Import` over configuration bean",
"defaultSeverity": "WARNING"
}
]
},
{
"id": "spring-aot",
"label": "AOT Optimizations",
@@ -135,7 +158,7 @@
"preferenceKey": "boot-java.validation.java.spring-aot",
"defaultValue": "OFF"
},
"order": 3,
"order": 4,
"problemTypes": [
{
"code": "JAVA_CONCRETE_BEAN_TYPE",
@@ -160,7 +183,7 @@
{
"id": "application-properties",
"label": "Property Config Files",
"order": 4,
"order": 5,
"problemTypes": [
{
"code": "PROP_INVALID_BEAN_NAVIGATION",
@@ -233,7 +256,7 @@
{
"id": "application-yaml",
"label": "YAML Config Files",
"order": 5,
"order": 6,
"problemTypes": [
{
"code": "YAML_SYNTAX_ERROR",
@@ -327,7 +350,7 @@
"preferenceKey": "boot-java.validation.spel.on",
"defaultValue": "ON"
},
"order": 6,
"order": 7,
"problemTypes": [
{
"code": "JAVA_SPEL_EXPRESSION_SYNTAX",
@@ -355,7 +378,7 @@
"preferenceKey": "boot-java.validation.java.version-validation",
"defaultValue": "ON"
},
"order": 7,
"order": 8,
"problemTypes": [
{
"code": "SUPPORTED_OSS_VERSION",
@@ -413,7 +436,7 @@
"preferenceKey": "boot-java.validation.data-query",
"defaultValue": "ON"
},
"order": 8,
"order": 9,
"problemTypes": [
{
"code": "JPQL_SYNTAX",
@@ -447,7 +470,7 @@
"preferenceKey": "boot-java.validation.cron",
"defaultValue": "ON"
},
"order": 9,
"order": 10,
"problemTypes": [
{
"code": "SYNTAX",

View File

@@ -28,6 +28,7 @@ import java.util.stream.Stream;
import org.apache.commons.io.FileUtils;
import org.springframework.ide.vscode.boot.java.Boot2JavaProblemType;
import org.springframework.ide.vscode.boot.java.Boot3JavaProblemType;
import org.springframework.ide.vscode.boot.java.Boot4JavaProblemType;
import org.springframework.ide.vscode.boot.java.SpelProblemType;
import org.springframework.ide.vscode.boot.java.SpringAotJavaProblemType;
import org.springframework.ide.vscode.boot.java.cron.CronProblemType;
@@ -177,6 +178,7 @@ public class ProblemTypesToJson {
writer.collectProblemTypeData(Boot2JavaProblemType.values());
writer.collectProblemTypeData(ApplicationPropertiesProblemType.values());
writer.collectProblemTypeData(Boot3JavaProblemType.values());
writer.collectProblemTypeData(Boot4JavaProblemType.values());
writer.collectProblemTypeData(SpringAotJavaProblemType.values());
writer.collectProblemTypeData(VersionValidationProblemType.values());
writer.collectProblemTypeData(QueryProblemType.values());