Package io.micronaut.http.ssl
Class ServerSslConfiguration
java.lang.Object
io.micronaut.http.ssl.SslConfiguration
io.micronaut.http.ssl.ServerSslConfiguration
- All Implemented Interfaces:
Toggleable
@ConfigurationProperties("micronaut.server.ssl")
public class ServerSslConfiguration
extends SslConfiguration
The default
SslConfiguration
used for HTTP servers.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The defaultSslConfiguration.KeyConfiguration
.static class
The defaultSslConfiguration.KeyStoreConfiguration
.static class
The defaultSslConfiguration.TrustStoreConfiguration
.Nested classes/interfaces inherited from class io.micronaut.http.ssl.SslConfiguration
SslConfiguration.KeyConfiguration, SslConfiguration.KeyStoreConfiguration, SslConfiguration.TrustStoreConfiguration
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The prefix used to resolve this configuration.Fields inherited from class io.micronaut.http.ssl.SslConfiguration
buildSelfSigned, DEFAULT_BUILDSELFSIGNED, DEFAULT_ENABLED, DEFAULT_PORT, DEFAULT_PROTOCOL, port
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the default server SSL configuration.ServerSslConfiguration
(DefaultSslConfiguration defaultSslConfiguration, DefaultSslConfiguration.DefaultKeyConfiguration defaultKeyConfiguration, DefaultSslConfiguration.DefaultKeyStoreConfiguration defaultKeyStoreConfiguration, SslConfiguration.TrustStoreConfiguration defaultTrustStoreConfiguration) Overrides the default constructor and setsSslConfiguration.isEnabled()
to true. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setBuildSelfSigned
(boolean buildSelfSigned) Sets whether to build a self-signed certificate.void
setPort
(int port) Deprecated.Methods inherited from class io.micronaut.http.ssl.SslConfiguration
buildSelfSigned, getCiphers, getClientAuthentication, getHandshakeTimeout, getKey, getKeyStore, getPort, getProtocol, getProtocols, getTrustStore, isEnabled, readExisting, setCiphers, setClientAuthentication, setEnabled, setHandshakeTimeout, setKey, setKeyStore, setProtocol, setProtocols, setTrustStore
-
Field Details
-
PREFIX
The prefix used to resolve this configuration.- See Also:
-
-
Constructor Details
-
ServerSslConfiguration
@Inject public ServerSslConfiguration(DefaultSslConfiguration defaultSslConfiguration, DefaultSslConfiguration.DefaultKeyConfiguration defaultKeyConfiguration, DefaultSslConfiguration.DefaultKeyStoreConfiguration defaultKeyStoreConfiguration, SslConfiguration.TrustStoreConfiguration defaultTrustStoreConfiguration) Overrides the default constructor and setsSslConfiguration.isEnabled()
to true.- Parameters:
defaultSslConfiguration
- The default SSL configdefaultKeyConfiguration
- The default key configdefaultKeyStoreConfiguration
- The default keystore configdefaultTrustStoreConfiguration
- The Default truststore config
-
ServerSslConfiguration
public ServerSslConfiguration()Constructs the default server SSL configuration.
-
-
Method Details
-
setPort
public void setPort(int port) Deprecated.Please usemicronaut.server.ssl.port
instead (setPort(int)
).Sets the SSL port. Default value (8443).- Overrides:
setPort
in classSslConfiguration
- Parameters:
port
- The port
-
setBuildSelfSigned
public void setBuildSelfSigned(boolean buildSelfSigned) Sets whether to build a self-signed certificate. Default value (false).- Overrides:
setBuildSelfSigned
in classSslConfiguration
- Parameters:
buildSelfSigned
- True if a certificate should be built
-
micronaut.server.ssl.port
instead (setPort(int)
).