This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch man in repository https://gitbox.apache.org/repos/asf/camel.git
commit a732fdc0b53caa4ae3cc04233eac50e0856086a8 Author: Claus Ibsen <[email protected]> AuthorDate: Tue Jul 29 15:40:35 2025 +0200 CAMEL-22285: platform-http-main - Dev consoles should be registered as management endpoints --- ...entServerConfigurationPropertiesConfigurer.java | 7 - ...ttpServerConfigurationPropertiesConfigurer.java | 77 ------ .../camel-main-configuration-metadata.json | 12 - core/camel-main/src/main/docs/main.adoc | 16 +- ...ttpManagementServerConfigurationProperties.java | 33 +-- .../main/HttpServerConfigurationProperties.java | 277 +-------------------- 6 files changed, 18 insertions(+), 404 deletions(-) diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/HttpManagementServerConfigurationPropertiesConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/HttpManagementServerConfigurationPropertiesConfigurer.java index 93bb9e9fb68..a2f420a87d2 100644 --- a/core/camel-main/src/generated/java/org/apache/camel/main/HttpManagementServerConfigurationPropertiesConfigurer.java +++ b/core/camel-main/src/generated/java/org/apache/camel/main/HttpManagementServerConfigurationPropertiesConfigurer.java @@ -36,7 +36,6 @@ public class HttpManagementServerConfigurationPropertiesConfigurer extends org.a map.put("JwtKeystorePassword", java.lang.String.class); map.put("JwtKeystorePath", java.lang.String.class); map.put("JwtKeystoreType", java.lang.String.class); - map.put("MaxBodySize", java.lang.Long.class); map.put("MetricsEnabled", boolean.class); map.put("Path", java.lang.String.class); map.put("Port", int.class); @@ -75,8 +74,6 @@ public class HttpManagementServerConfigurationPropertiesConfigurer extends org.a case "jwtKeystorePath": target.setJwtKeystorePath(property(camelContext, java.lang.String.class, value)); return true; case "jwtkeystoretype": case "jwtKeystoreType": target.setJwtKeystoreType(property(camelContext, java.lang.String.class, value)); return true; - case "maxbodysize": - case "maxBodySize": target.setMaxBodySize(property(camelContext, java.lang.Long.class, value)); return true; case "metricsenabled": case "metricsEnabled": target.setMetricsEnabled(property(camelContext, boolean.class, value)); return true; case "path": target.setPath(property(camelContext, java.lang.String.class, value)); return true; @@ -123,8 +120,6 @@ public class HttpManagementServerConfigurationPropertiesConfigurer extends org.a case "jwtKeystorePath": return java.lang.String.class; case "jwtkeystoretype": case "jwtKeystoreType": return java.lang.String.class; - case "maxbodysize": - case "maxBodySize": return java.lang.Long.class; case "metricsenabled": case "metricsEnabled": return boolean.class; case "path": return java.lang.String.class; @@ -167,8 +162,6 @@ public class HttpManagementServerConfigurationPropertiesConfigurer extends org.a case "jwtKeystorePath": return target.getJwtKeystorePath(); case "jwtkeystoretype": case "jwtKeystoreType": return target.getJwtKeystoreType(); - case "maxbodysize": - case "maxBodySize": return target.getMaxBodySize(); case "metricsenabled": case "metricsEnabled": return target.isMetricsEnabled(); case "path": return target.getPath(); diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/HttpServerConfigurationPropertiesConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/HttpServerConfigurationPropertiesConfigurer.java index dface0fc64b..17b45ad9a81 100644 --- a/core/camel-main/src/generated/java/org/apache/camel/main/HttpServerConfigurationPropertiesConfigurer.java +++ b/core/camel-main/src/generated/java/org/apache/camel/main/HttpServerConfigurationPropertiesConfigurer.java @@ -25,30 +25,19 @@ public class HttpServerConfigurationPropertiesConfigurer extends org.apache.came map.put("AuthenticationEnabled", boolean.class); map.put("AuthenticationPath", java.lang.String.class); map.put("BasicPropertiesFile", java.lang.String.class); - map.put("DevConsoleEnabled", boolean.class); - map.put("DownloadEnabled", boolean.class); map.put("Enabled", boolean.class); map.put("FileUploadDirectory", java.lang.String.class); map.put("FileUploadEnabled", boolean.class); - map.put("HealthCheckEnabled", boolean.class); - map.put("HealthPath", java.lang.String.class); map.put("Host", java.lang.String.class); - map.put("InfoEnabled", boolean.class); - map.put("JolokiaEnabled", boolean.class); - map.put("JolokiaPath", java.lang.String.class); map.put("JwtKeystorePassword", java.lang.String.class); map.put("JwtKeystorePath", java.lang.String.class); map.put("JwtKeystoreType", java.lang.String.class); map.put("MaxBodySize", java.lang.Long.class); - map.put("MetricsEnabled", boolean.class); map.put("Path", java.lang.String.class); map.put("Port", int.class); - map.put("SendEnabled", boolean.class); map.put("StaticContextPath", java.lang.String.class); map.put("StaticEnabled", boolean.class); map.put("StaticSourceDir", java.lang.String.class); - map.put("UploadEnabled", boolean.class); - map.put("UploadSourceDir", java.lang.String.class); map.put("UseGlobalSslContextParameters", boolean.class); ALL_OPTIONS = map; } @@ -63,26 +52,12 @@ public class HttpServerConfigurationPropertiesConfigurer extends org.apache.came case "authenticationPath": target.setAuthenticationPath(property(camelContext, java.lang.String.class, value)); return true; case "basicpropertiesfile": case "basicPropertiesFile": target.setBasicPropertiesFile(property(camelContext, java.lang.String.class, value)); return true; - case "devconsoleenabled": - case "devConsoleEnabled": target.setDevConsoleEnabled(property(camelContext, boolean.class, value)); return true; - case "downloadenabled": - case "downloadEnabled": target.setDownloadEnabled(property(camelContext, boolean.class, value)); return true; case "enabled": target.setEnabled(property(camelContext, boolean.class, value)); return true; case "fileuploaddirectory": case "fileUploadDirectory": target.setFileUploadDirectory(property(camelContext, java.lang.String.class, value)); return true; case "fileuploadenabled": case "fileUploadEnabled": target.setFileUploadEnabled(property(camelContext, boolean.class, value)); return true; - case "healthcheckenabled": - case "healthCheckEnabled": target.setHealthCheckEnabled(property(camelContext, boolean.class, value)); return true; - case "healthpath": - case "healthPath": target.setHealthPath(property(camelContext, java.lang.String.class, value)); return true; case "host": target.setHost(property(camelContext, java.lang.String.class, value)); return true; - case "infoenabled": - case "infoEnabled": target.setInfoEnabled(property(camelContext, boolean.class, value)); return true; - case "jolokiaenabled": - case "jolokiaEnabled": target.setJolokiaEnabled(property(camelContext, boolean.class, value)); return true; - case "jolokiapath": - case "jolokiaPath": target.setJolokiaPath(property(camelContext, java.lang.String.class, value)); return true; case "jwtkeystorepassword": case "jwtKeystorePassword": target.setJwtKeystorePassword(property(camelContext, java.lang.String.class, value)); return true; case "jwtkeystorepath": @@ -91,22 +66,14 @@ public class HttpServerConfigurationPropertiesConfigurer extends org.apache.came case "jwtKeystoreType": target.setJwtKeystoreType(property(camelContext, java.lang.String.class, value)); return true; case "maxbodysize": case "maxBodySize": target.setMaxBodySize(property(camelContext, java.lang.Long.class, value)); return true; - case "metricsenabled": - case "metricsEnabled": target.setMetricsEnabled(property(camelContext, boolean.class, value)); return true; case "path": target.setPath(property(camelContext, java.lang.String.class, value)); return true; case "port": target.setPort(property(camelContext, int.class, value)); return true; - case "sendenabled": - case "sendEnabled": target.setSendEnabled(property(camelContext, boolean.class, value)); return true; case "staticcontextpath": case "staticContextPath": target.setStaticContextPath(property(camelContext, java.lang.String.class, value)); return true; case "staticenabled": case "staticEnabled": target.setStaticEnabled(property(camelContext, boolean.class, value)); return true; case "staticsourcedir": case "staticSourceDir": target.setStaticSourceDir(property(camelContext, java.lang.String.class, value)); return true; - case "uploadenabled": - case "uploadEnabled": target.setUploadEnabled(property(camelContext, boolean.class, value)); return true; - case "uploadsourcedir": - case "uploadSourceDir": target.setUploadSourceDir(property(camelContext, java.lang.String.class, value)); return true; case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": target.setUseGlobalSslContextParameters(property(camelContext, boolean.class, value)); return true; default: return false; @@ -127,26 +94,12 @@ public class HttpServerConfigurationPropertiesConfigurer extends org.apache.came case "authenticationPath": return java.lang.String.class; case "basicpropertiesfile": case "basicPropertiesFile": return java.lang.String.class; - case "devconsoleenabled": - case "devConsoleEnabled": return boolean.class; - case "downloadenabled": - case "downloadEnabled": return boolean.class; case "enabled": return boolean.class; case "fileuploaddirectory": case "fileUploadDirectory": return java.lang.String.class; case "fileuploadenabled": case "fileUploadEnabled": return boolean.class; - case "healthcheckenabled": - case "healthCheckEnabled": return boolean.class; - case "healthpath": - case "healthPath": return java.lang.String.class; case "host": return java.lang.String.class; - case "infoenabled": - case "infoEnabled": return boolean.class; - case "jolokiaenabled": - case "jolokiaEnabled": return boolean.class; - case "jolokiapath": - case "jolokiaPath": return java.lang.String.class; case "jwtkeystorepassword": case "jwtKeystorePassword": return java.lang.String.class; case "jwtkeystorepath": @@ -155,22 +108,14 @@ public class HttpServerConfigurationPropertiesConfigurer extends org.apache.came case "jwtKeystoreType": return java.lang.String.class; case "maxbodysize": case "maxBodySize": return java.lang.Long.class; - case "metricsenabled": - case "metricsEnabled": return boolean.class; case "path": return java.lang.String.class; case "port": return int.class; - case "sendenabled": - case "sendEnabled": return boolean.class; case "staticcontextpath": case "staticContextPath": return java.lang.String.class; case "staticenabled": case "staticEnabled": return boolean.class; case "staticsourcedir": case "staticSourceDir": return java.lang.String.class; - case "uploadenabled": - case "uploadEnabled": return boolean.class; - case "uploadsourcedir": - case "uploadSourceDir": return java.lang.String.class; case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": return boolean.class; default: return null; @@ -187,26 +132,12 @@ public class HttpServerConfigurationPropertiesConfigurer extends org.apache.came case "authenticationPath": return target.getAuthenticationPath(); case "basicpropertiesfile": case "basicPropertiesFile": return target.getBasicPropertiesFile(); - case "devconsoleenabled": - case "devConsoleEnabled": return target.isDevConsoleEnabled(); - case "downloadenabled": - case "downloadEnabled": return target.isDownloadEnabled(); case "enabled": return target.isEnabled(); case "fileuploaddirectory": case "fileUploadDirectory": return target.getFileUploadDirectory(); case "fileuploadenabled": case "fileUploadEnabled": return target.isFileUploadEnabled(); - case "healthcheckenabled": - case "healthCheckEnabled": return target.isHealthCheckEnabled(); - case "healthpath": - case "healthPath": return target.getHealthPath(); case "host": return target.getHost(); - case "infoenabled": - case "infoEnabled": return target.isInfoEnabled(); - case "jolokiaenabled": - case "jolokiaEnabled": return target.isJolokiaEnabled(); - case "jolokiapath": - case "jolokiaPath": return target.getJolokiaPath(); case "jwtkeystorepassword": case "jwtKeystorePassword": return target.getJwtKeystorePassword(); case "jwtkeystorepath": @@ -215,22 +146,14 @@ public class HttpServerConfigurationPropertiesConfigurer extends org.apache.came case "jwtKeystoreType": return target.getJwtKeystoreType(); case "maxbodysize": case "maxBodySize": return target.getMaxBodySize(); - case "metricsenabled": - case "metricsEnabled": return target.isMetricsEnabled(); case "path": return target.getPath(); case "port": return target.getPort(); - case "sendenabled": - case "sendEnabled": return target.isSendEnabled(); case "staticcontextpath": case "staticContextPath": return target.getStaticContextPath(); case "staticenabled": case "staticEnabled": return target.isStaticEnabled(); case "staticsourcedir": case "staticSourceDir": return target.getStaticSourceDir(); - case "uploadenabled": - case "uploadEnabled": return target.isUploadEnabled(); - case "uploadsourcedir": - case "uploadSourceDir": return target.getUploadSourceDir(); case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": return target.isUseGlobalSslContextParameters(); default: return null; diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json index d28e97682aa..0fe6ab967ee 100644 --- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json +++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json @@ -205,7 +205,6 @@ { "name": "camel.management.jwtKeystorePassword", "description": "Password from the keystore used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.management.jwtKeystorePath", "description": "Path to the keystore file used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.management.jwtKeystoreType", "description": "Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.).", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.management.maxBodySize", "description": "Maximum HTTP body size the embedded HTTP server can accept.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "integer", "javaType": "java.lang.Long" }, { "name": "camel.management.metricsEnabled", "description": "Whether to enable metrics. If enabled then you can access metrics on context-path: \/q\/metrics (default)", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.management.path", "description": "Context-path to use for embedded HTTP server", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/" }, { "name": "camel.management.port", "description": "Port to use for binding embedded HTTP server", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 9876 }, @@ -301,30 +300,19 @@ { "name": "camel.server.authenticationEnabled", "description": "Whether to enable HTTP authentication for embedded server (for standalone applications; not Spring Boot or Quarkus).", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.authenticationPath", "description": "Set HTTP url path of embedded server that is protected by authentication configuration.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.basicPropertiesFile", "description": "Name of the file that contains basic authentication info for Vert.x file auth provider.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.server.devConsoleEnabled", "description": "Whether to enable developer console (not intended for production use). Dev console must also be enabled on CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code camelContext.setDevConsole(true); If enabled then you can access a basic developer console on context-path: \/q\/dev. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.m [...] - { "name": "camel.server.downloadEnabled", "description": "Whether to enable file download via HTTP. This makes it possible to browse and download resource source files such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for management and monitoring.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.enabled", "description": "Whether embedded HTTP server is enabled. By default, the server is not enabled.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.fileUploadDirectory", "description": "Directory to temporary store file uploads while Camel routes the incoming request. If no directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.fileUploadEnabled", "description": "Whether to enable file uploads being supported (such as POST multipart\/form-data) and stored into a temporary directory.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true }, - { "name": "camel.server.healthCheckEnabled", "description": "Whether to enable health-check console. If enabled then you can access health-check status on context-path: \/q\/health (default). Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, - { "name": "camel.server.healthPath", "description": "The path endpoint used to expose the health status. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/q\/health" }, { "name": "camel.server.host", "description": "Hostname to use for binding embedded HTTP server", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "0.0.0.0" }, - { "name": "camel.server.infoEnabled", "description": "Whether to enable info console. If enabled then you can see some basic Camel information at \/q\/info. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, - { "name": "camel.server.jolokiaEnabled", "description": "Whether to enable jolokia. If enabled then you can access jolokia api on context-path: \/q\/jolokia. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, - { "name": "camel.server.jolokiaPath", "description": "The path endpoint used to expose the jolokia data. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/q\/jolokia" }, { "name": "camel.server.jwtKeystorePassword", "description": "Password from the keystore used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.jwtKeystorePath", "description": "Path to the keystore file used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.jwtKeystoreType", "description": "Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.).", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.maxBodySize", "description": "Maximum HTTP body size the embedded HTTP server can accept.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "integer", "javaType": "java.lang.Long" }, - { "name": "camel.server.metricsEnabled", "description": "Whether to enable metrics. If enabled then you can access metrics on context-path: \/q\/metrics (default). Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.path", "description": "Context-path to use for embedded HTTP server", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/" }, { "name": "camel.server.port", "description": "Port to use for binding embedded HTTP server", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 8080 }, - { "name": "camel.server.sendEnabled", "description": "Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to Camel endpoint URIs via HTTP.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.staticContextPath", "description": "The context-path to use for serving static content. By default, the root path is used. And if there is an index.html page then this is automatically loaded.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/" }, { "name": "camel.server.staticEnabled", "description": "Whether serving static files is enabled. If enabled then Camel can host html\/js and other web files that makes it possible to include small web applications.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.staticSourceDir", "description": "Additional directory that holds static content when static is enabled.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.server.uploadEnabled", "description": "Whether to enable file upload via HTTP (not intended for production use). This functionality is for development to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can upload\/delete files via HTTP PUT\/DELETE on context-path: \/q\/upload\/{name}. You must also configure the uploadSourceDir option.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "t [...] - { "name": "camel.server.uploadSourceDir", "description": "Source directory when upload is enabled.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.useGlobalSslContextParameters", "description": "Whether to use global SSL configuration for securing the embedded HTTP server.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.ssl.certAlias", "description": "An optional certificate alias to use. This is useful when the keystore has multiple certificates.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.ssl.cipherSuites", "description": "List of TLS\/SSL cipher suite algorithm names. Multiple names can be separated by comma.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc index 67a783f0125..f50aa19a745 100644 --- a/core/camel-main/src/main/docs/main.adoc +++ b/core/camel-main/src/main/docs/main.adoc @@ -189,7 +189,7 @@ The camel.routecontroller supports 12 options, which are listed below. === Camel Embedded HTTP Server (only for standalone; not Spring Boot or Quarkus) configurations -The camel.server supports 28 options, which are listed below. +The camel.server supports 17 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== @@ -197,36 +197,25 @@ The camel.server supports 28 options, which are listed below. | *camel.server.authentication{zwsp}Enabled* | Whether to enable HTTP authentication for embedded server (for standalone applications; not Spring Boot or Quarkus). | false | boolean | *camel.server.authentication{zwsp}Path* | Set HTTP url path of embedded server that is protected by authentication configuration. | | String | *camel.server.basicProperties{zwsp}File* | Name of the file that contains basic authentication info for Vert.x file auth provider. | | String -| *camel.server.devConsoleEnabled* | Whether to enable developer console (not intended for production use). Dev console must also be enabled on CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code camelContext.setDevConsole(true); If enabled then you can access a basic developer console on context-path: /q/dev. Deprecated since 4.12.0, use HTTP management server instead. | false | boolean -| *camel.server.downloadEnabled* | Whether to enable file download via HTTP. This makes it possible to browse and download resource source files such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for management and monitoring. | false | boolean | *camel.server.enabled* | Whether embedded HTTP server is enabled. By default, the server is not enabled. | false | boolean | *camel.server.fileUpload{zwsp}Directory* | Directory to temporary store file uploads while Camel routes the incoming request. If no directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory. | | String | *camel.server.fileUploadEnabled* | Whether to enable file uploads being supported (such as POST multipart/form-data) and stored into a temporary directory. | true | boolean -| *camel.server.healthCheck{zwsp}Enabled* | Whether to enable health-check console. If enabled then you can access health-check status on context-path: /q/health (default). Deprecated since 4.12.0, use HTTP management server instead. | false | boolean -| *camel.server.healthPath* | The path endpoint used to expose the health status. Deprecated since 4.12.0, use HTTP management server instead. | /q/health | String | *camel.server.host* | Hostname to use for binding embedded HTTP server | 0.0.0.0 | String -| *camel.server.infoEnabled* | Whether to enable info console. If enabled then you can see some basic Camel information at /q/info. Deprecated since 4.12.0, use HTTP management server instead. | false | boolean -| *camel.server.jolokiaEnabled* | Whether to enable jolokia. If enabled then you can access jolokia api on context-path: /q/jolokia. Deprecated since 4.12.0, use HTTP management server instead. | false | boolean -| *camel.server.jolokiaPath* | The path endpoint used to expose the jolokia data. Deprecated since 4.12.0, use HTTP management server instead. | /q/jolokia | String | *camel.server.jwtKeystore{zwsp}Password* | Password from the keystore used for JWT tokens validation. | | String | *camel.server.jwtKeystorePath* | Path to the keystore file used for JWT tokens validation. | | String | *camel.server.jwtKeystoreType* | Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.). | | String | *camel.server.maxBodySize* | Maximum HTTP body size the embedded HTTP server can accept. | | Long -| *camel.server.metricsEnabled* | Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics (default). Deprecated since 4.12.0, use HTTP management server instead. | false | boolean | *camel.server.path* | Context-path to use for embedded HTTP server | / | String | *camel.server.port* | Port to use for binding embedded HTTP server | 8080 | int -| *camel.server.sendEnabled* | Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to Camel endpoint URIs via HTTP. | false | boolean | *camel.server.staticContextPath* | The context-path to use for serving static content. By default, the root path is used. And if there is an index.html page then this is automatically loaded. | / | String | *camel.server.staticEnabled* | Whether serving static files is enabled. If enabled then Camel can host html/js and other web files that makes it possible to include small web applications. | false | boolean | *camel.server.staticSourceDir* | Additional directory that holds static content when static is enabled. | | String -| *camel.server.uploadEnabled* | Whether to enable file upload via HTTP (not intended for production use). This functionality is for development to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can upload/delete files via HTTP PUT/DELETE on context-path: /q/upload/\{name}. You must also configure the uploadSourceDir option. | false | boolean -| *camel.server.uploadSourceDir* | Source directory when upload is enabled. | | String | *camel.server.useGlobalSsl{zwsp}ContextParameters* | Whether to use global SSL configuration for securing the embedded HTTP server. | false | boolean |=== === Camel Embedded HTTP management Server (only for standalone; not Spring Boot or Quarkus) configurations -The camel.management supports 20 options, which are listed below. +The camel.management supports 19 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== @@ -245,7 +234,6 @@ The camel.management supports 20 options, which are listed below. | *camel.management.jwtKeystore{zwsp}Password* | Password from the keystore used for JWT tokens validation. | | String | *camel.management.jwtKeystore{zwsp}Path* | Path to the keystore file used for JWT tokens validation. | | String | *camel.management.jwtKeystore{zwsp}Type* | Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.). | | String -| *camel.management.maxBodySize* | Maximum HTTP body size the embedded HTTP server can accept. | | Long | *camel.management.metrics{zwsp}Enabled* | Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics (default) | false | boolean | *camel.management.path* | Context-path to use for embedded HTTP server | / | String | *camel.management.port* | Port to use for binding embedded HTTP server | 9876 | int diff --git a/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java index 521a4be8197..a157c0e35a2 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java @@ -36,8 +36,11 @@ public class HttpManagementServerConfigurationProperties implements BootstrapClo private int port = 9876; @Metadata(defaultValue = "/") private String path = "/"; - private Long maxBodySize; - private boolean useGlobalSslContextParameters; + @Metadata(defaultValue = "/observe/health") + private String healthPath = "/observe/health"; + @Metadata(defaultValue = "/observe/jolokia") + private String jolokiaPath = "/observe/jolokia"; + private boolean infoEnabled; private boolean devConsoleEnabled; private boolean healthCheckEnabled; @@ -45,6 +48,8 @@ public class HttpManagementServerConfigurationProperties implements BootstrapClo private boolean metricsEnabled; private boolean sendEnabled; + @Metadata(label = "security") + private boolean useGlobalSslContextParameters; @Metadata(label = "security") private boolean authenticationEnabled; @Metadata(label = "security") @@ -58,11 +63,6 @@ public class HttpManagementServerConfigurationProperties implements BootstrapClo @Metadata(label = "security", secret = true) private String jwtKeystorePassword; - @Metadata(defaultValue = "/observe/health") - private String healthPath = "/observe/health"; - @Metadata(defaultValue = "/observe/jolokia") - private String jolokiaPath = "/observe/jolokia"; - public HttpManagementServerConfigurationProperties(MainConfigurationProperties parent) { this.parent = parent; } @@ -120,17 +120,6 @@ public class HttpManagementServerConfigurationProperties implements BootstrapClo this.path = path; } - public Long getMaxBodySize() { - return maxBodySize; - } - - /** - * Maximum HTTP body size the embedded HTTP server can accept. - */ - public void setMaxBodySize(Long maxBodySize) { - this.maxBodySize = maxBodySize; - } - public boolean isUseGlobalSslContextParameters() { return useGlobalSslContextParameters; } @@ -334,14 +323,6 @@ public class HttpManagementServerConfigurationProperties implements BootstrapClo return this; } - /** - * Maximum HTTP body size the embedded HTTP management server can accept. - */ - public HttpManagementServerConfigurationProperties withMaxBodySize(long maxBodySize) { - this.maxBodySize = maxBodySize; - return this; - } - /** * Whether to use global SSL configuration for securing the embedded HTTP management server. */ diff --git a/core/camel-main/src/main/java/org/apache/camel/main/HttpServerConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/HttpServerConfigurationProperties.java index 3b16350796b..1172c9464b2 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/HttpServerConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/HttpServerConfigurationProperties.java @@ -36,31 +36,20 @@ public class HttpServerConfigurationProperties implements BootstrapCloseable { private int port = 8080; @Metadata(defaultValue = "/") private String path = "/"; - private Long maxBodySize; - private boolean useGlobalSslContextParameters; - @Metadata(defaultValue = "true") - private boolean fileUploadEnabled = true; - @Metadata - private String fileUploadDirectory; - @Deprecated - private boolean infoEnabled; + private boolean staticEnabled; private String staticSourceDir; @Metadata(defaultValue = "/") private String staticContextPath = "/"; - @Deprecated - private boolean devConsoleEnabled; - @Deprecated - private boolean healthCheckEnabled; - @Deprecated - private boolean jolokiaEnabled; - @Deprecated - private boolean metricsEnabled; - private boolean uploadEnabled; - private String uploadSourceDir; - private boolean downloadEnabled; - private boolean sendEnabled; + @Metadata(label = "advanced", defaultValue = "true") + private boolean fileUploadEnabled = true; + @Metadata(label = "advanced") + private String fileUploadDirectory; + @Metadata(label = "advanced") + private Long maxBodySize; + @Metadata(label = "security") + private boolean useGlobalSslContextParameters; @Metadata(label = "security") private boolean authenticationEnabled; @Metadata(label = "security") @@ -74,13 +63,6 @@ public class HttpServerConfigurationProperties implements BootstrapCloseable { @Metadata(label = "security", secret = true) private String jwtKeystorePassword; - @Deprecated - @Metadata(defaultValue = "/q/health") - private String healthPath = "/q/health"; - @Deprecated - @Metadata(defaultValue = "/q/jolokia") - private String jolokiaPath = "/q/jolokia"; - public HttpServerConfigurationProperties(MainConfigurationProperties parent) { this.parent = parent; } @@ -186,19 +168,6 @@ public class HttpServerConfigurationProperties implements BootstrapCloseable { this.fileUploadDirectory = fileUploadDirectory; } - @Deprecated(since = "4.12.0") - public boolean isInfoEnabled() { - return infoEnabled; - } - - /** - * Whether to enable info console. If enabled then you can see some basic Camel information at /q/info. Deprecated - * since 4.12.0, use HTTP management server instead. - */ - public void setInfoEnabled(boolean infoEnabled) { - this.infoEnabled = infoEnabled; - } - public boolean isStaticEnabled() { return staticEnabled; } @@ -234,133 +203,6 @@ public class HttpServerConfigurationProperties implements BootstrapCloseable { this.staticContextPath = staticContextPath; } - public boolean isDevConsoleEnabled() { - return devConsoleEnabled; - } - - /** - * Whether to enable developer console (not intended for production use). Dev console must also be enabled on - * CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code - * <tt>camelContext.setDevConsole(true);</tt> If enabled then you can access a basic developer console on - * context-path: /q/dev. Deprecated since 4.12.0, use HTTP management server instead. - */ - public void setDevConsoleEnabled(boolean devConsoleEnabled) { - this.devConsoleEnabled = devConsoleEnabled; - } - - @Deprecated(since = "4.12.0") - public boolean isHealthCheckEnabled() { - return healthCheckEnabled; - } - - /** - * Whether to enable health-check console. If enabled then you can access health-check status on context-path: - * /q/health (default). Deprecated since 4.12.0, use HTTP management server instead. - */ - public void setHealthCheckEnabled(boolean healthCheckEnabled) { - this.healthCheckEnabled = healthCheckEnabled; - } - - @Deprecated(since = "4.12.0") - public boolean isJolokiaEnabled() { - return jolokiaEnabled; - } - - /** - * Whether to enable jolokia. If enabled then you can access jolokia api on context-path: /q/jolokia. Deprecated - * since 4.12.0, use HTTP management server instead. - */ - public void setJolokiaEnabled(boolean jolokiaEnabled) { - this.jolokiaEnabled = jolokiaEnabled; - } - - @Deprecated(since = "4.12.0") - public boolean isMetricsEnabled() { - return metricsEnabled; - } - - /** - * Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics (default). - * Deprecated since 4.12.0, use HTTP management server instead. - */ - public void setMetricsEnabled(boolean metricsEnabled) { - this.metricsEnabled = metricsEnabled; - } - - @Deprecated(since = "4.12.0") - public String getHealthPath() { - return healthPath; - } - - /** - * The path endpoint used to expose the health status. Deprecated since 4.12.0, use HTTP management server instead. - */ - public void setHealthPath(String healthPath) { - this.healthPath = healthPath; - } - - @Deprecated(since = "4.12.0") - public String getJolokiaPath() { - return jolokiaPath; - } - - /** - * The path endpoint used to expose the jolokia data. Deprecated since 4.12.0, use HTTP management server instead. - */ - public void setJolokiaPath(String jolokiaPath) { - this.jolokiaPath = jolokiaPath; - } - - public boolean isUploadEnabled() { - return uploadEnabled; - } - - /** - * Whether to enable file upload via HTTP (not intended for production use). This functionality is for development - * to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can - * upload/delete files via HTTP PUT/DELETE on context-path: /q/upload/{name}. You must also configure the - * uploadSourceDir option. - */ - public void setUploadEnabled(boolean uploadEnabled) { - this.uploadEnabled = uploadEnabled; - } - - public String getUploadSourceDir() { - return uploadSourceDir; - } - - /** - * Source directory when upload is enabled. - */ - public void setUploadSourceDir(String uploadSourceDir) { - this.uploadSourceDir = uploadSourceDir; - } - - public boolean isDownloadEnabled() { - return downloadEnabled; - } - - /** - * Whether to enable file download via HTTP. This makes it possible to browse and download resource source files - * such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for - * management and monitoring. - */ - public void setDownloadEnabled(boolean downloadEnabled) { - this.downloadEnabled = downloadEnabled; - } - - public boolean isSendEnabled() { - return sendEnabled; - } - - /** - * Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to - * Camel endpoint URIs via HTTP. - */ - public void setSendEnabled(boolean sendEnabled) { - this.sendEnabled = sendEnabled; - } - public boolean isAuthenticationEnabled() { return authenticationEnabled; } @@ -496,14 +338,6 @@ public class HttpServerConfigurationProperties implements BootstrapCloseable { return this; } - /** - * Whether to enable info console. If enabled then you can see some basic Camel information at /q/info - */ - public HttpServerConfigurationProperties withInfoEnabled(boolean infoEnabled) { - this.infoEnabled = infoEnabled; - return this; - } - /** * Whether serving static files is enabled. If enabled then Camel can host html/js and other web files that makes it * possible to include small web applications. @@ -530,83 +364,6 @@ public class HttpServerConfigurationProperties implements BootstrapCloseable { return this; } - /** - * - * Whether to enable developer console (not intended for production use). Dev console must also be enabled on - * CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code - * <tt>camelContext.setDevConsole(true);</tt> If enabled then you can access a basic developer console on - * context-path: /q/dev. Deprecated since 4.12.0, use HTTP management server instead. - */ - public HttpServerConfigurationProperties withDevConsoleEnabled(boolean devConsoleEnabled) { - this.devConsoleEnabled = devConsoleEnabled; - return this; - } - - /** - * Whether to enable health-check console. If enabled then you can access health-check status on context-path: - * /q/health (default). Deprecated since 4.12.0, use HTTP management server instead. - */ - public HttpServerConfigurationProperties withHealthCheckEnabled(boolean healthCheckEnabled) { - this.healthCheckEnabled = healthCheckEnabled; - return this; - } - - /** - * Whether to enable jolokia. If enabled then you can access jolokia api on context-path: /q/jolokia. Deprecated - * since 4.12.0, use HTTP management server instead. - */ - public HttpServerConfigurationProperties withJolokiaEnabled(boolean jolokiaEnabled) { - this.jolokiaEnabled = jolokiaEnabled; - return this; - } - - /** - * Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics (default). - * Deprecated since 4.12.0, use HTTP management server instead. - */ - public HttpServerConfigurationProperties withMetricsEnabled(boolean metricsEnabled) { - this.metricsEnabled = metricsEnabled; - return this; - } - - /** - * Whether to enable file upload via HTTP (not intended for production use). This functionality is for development - * to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can - * upload/delete files via HTTP PUT/DELETE on context-path: /q/upload/{name}. You must also configure the - * uploadSourceDir option. - */ - public HttpServerConfigurationProperties withUploadEnabled(boolean uploadEnabled) { - this.uploadEnabled = uploadEnabled; - return this; - } - - /** - * Source directory when upload is enabled. - */ - public HttpServerConfigurationProperties withUploadSourceDir(String uploadSourceDir) { - this.uploadSourceDir = uploadSourceDir; - return this; - } - - /** - * Whether to enable file download via HTTP. This makes it possible to browse and download resource source files - * such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for - * management and monitoring. - */ - public HttpServerConfigurationProperties withDownloadEnabled(boolean downloadEnabled) { - this.downloadEnabled = downloadEnabled; - return this; - } - - /** - * Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to - * Camel endpoint URIs via HTTP. - */ - public HttpServerConfigurationProperties withSendEnabled(boolean sendEnabled) { - this.sendEnabled = sendEnabled; - return this; - } - /** * Whether to enable HTTP authentication for embedded server (for standalone applications; not Spring Boot or * Quarkus). @@ -656,20 +413,4 @@ public class HttpServerConfigurationProperties implements BootstrapCloseable { return this; } - /** - * The path endpoint used to expose the health status - */ - public HttpServerConfigurationProperties withHealthPath(String healthPath) { - this.healthPath = healthPath; - return this; - } - - /** - * The path endpoint used to expose the jolokia data. Deprecated since 4.12.0, use HTTP management server instead. - */ - public HttpServerConfigurationProperties withJolokiaPath(String jolokiaPath) { - this.jolokiaPath = jolokiaPath; - return this; - } - }
