Package com.adobe.testing.s3mock
Class S3MockApplication
java.lang.Object
com.adobe.testing.s3mock.S3MockApplication
@SpringBootApplication(exclude=org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
excludeName="org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration")
public class S3MockApplication
extends Object
File Store Application that mocks Amazon S3.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringProperty name for passing the HTTP port to use.static final StringProperty name for passing the HTTPS port to use.static final StringProperty name for passing a comma separated list of buckets that are to be created at startup.static final StringProperty name for passing a root directory to use.static final StringProperty name for using either HTTPS or HTTP connections.static final StringProperty name for enabling the silent mode with logging set at WARN and without banner.static final intstatic final StringProperty name for specifying the key to use.static final StringProperty name for passing the password for the key.static final StringProperty name for passing the path to the keystore to use.static final StringProperty name for passing the password for the keystore. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.Using the S3Mock directly through Java is discouraged.intgetPort()Deprecated.Using the S3Mock directly through Java is discouraged.static voidMain Class that starts the server usingstart(String...).voidregisterKMSKeyRef(String keyRef) Deprecated.Using the S3Mock directly through Java is discouraged.static S3MockApplicationStarts the server.static S3MockApplicationStarts the server.voidstop()Stops the server.
-
Field Details
-
DEFAULT_HTTPS_PORT
public static final int DEFAULT_HTTPS_PORT- See Also:
-
DEFAULT_HTTP_PORT
public static final int DEFAULT_HTTP_PORT- See Also:
-
RANDOM_PORT
public static final int RANDOM_PORT- See Also:
-
DEFAULT_SERVER_SSL_KEY_STORE
- See Also:
-
DEFAULT_SERVER_SSL_KEY_STORE_PASSWORD
- See Also:
-
DEFAULT_SERVER_SSL_KEY_ALIAS
- See Also:
-
DEFAULT_SERVER_SSL_KEY_PASSWORD
- See Also:
-
PROP_INITIAL_BUCKETS
Property name for passing a comma separated list of buckets that are to be created at startup.- See Also:
-
PROP_ROOT_DIRECTORY
Property name for passing a root directory to use. If omitted a default temp-dir will be used.- See Also:
-
PROP_HTTPS_PORT
Property name for passing the HTTPS port to use. Defaults to 9191. If set to 0, a random port will be chosen.- See Also:
-
PROP_HTTP_PORT
Property name for passing the HTTP port to use. Defaults to 9090. If set to 0, a random port will be chosen.- See Also:
-
SERVER_SSL_KEY_STORE
Property name for passing the path to the keystore to use. Defaults to "classpath:s3mock.jks".- See Also:
-
SERVER_SSL_KEY_STORE_PASSWORD
Property name for passing the password for the keystore. Defaults to "password".- See Also:
-
SERVER_SSL_KEY_ALIAS
Property name for specifying the key to use. Defaults to "selfsigned".- See Also:
-
SERVER_SSL_KEY_PASSWORD
Property name for passing the password for the key. Defaults to "password".- See Also:
-
PROP_SECURE_CONNECTION
Property name for using either HTTPS or HTTP connections.- See Also:
-
PROP_SILENT
Property name for enabling the silent mode with logging set at WARN and without banner.- See Also:
-
-
Constructor Details
-
S3MockApplication
public S3MockApplication()
-
-
Method Details
-
main
Main Class that starts the server usingstart(String...).- Parameters:
args- Default command args.
-
start
Starts the server.- Parameters:
args- in program args format, e.g."--server.port=0".- Returns:
- the
S3MockApplication
-
start
Starts the server.- Parameters:
properties- properties to pass to the application in key-value format.args- in program args format, e.g."--server.port=0".- Returns:
- the
S3MockApplication
-
stop
public void stop()Stops the server. -
getPort
Deprecated.Using the S3Mock directly through Java is discouraged. Either run the JAR and start a separate JVM, or run the Docker container.Gets the Https server port.- Returns:
- Https server port.
-
getHttpPort
Deprecated.Using the S3Mock directly through Java is discouraged. Either run the JAR and start a separate JVM, or run the Docker container.Gets the Http server port.- Returns:
- Http server port.
-
registerKMSKeyRef
Deprecated.Using the S3Mock directly through Java is discouraged. Either run the JAR and start a separate JVM, or run the Docker container.Registers a valid KMS key reference on the mock server.- Parameters:
keyRef- A KMS Key Reference
-