public enum AppConfigKey extends java.lang.Enum<AppConfigKey> implements ConfigKey
App
configuration keys. General rules:
.enabled
, then you should be able to set the setting without .enabled
or replace it with .disabled
but the value will be inverted. For example, built_in.transformer.enabled
is equal to built_in.transformer
and invert to built_in.transformer.disabled
.impl
, then you can either put an instance into the configuration map or a string of the class classNameEnum Constant and Description |
---|
API_DOC_EABLED
`act.api_doc.enabled` turns on/off API doc feature
When API doc is enabled, developer can access the app's API document
through `GET /~/apidoc`
Default value: `true` when app running in `dev` mode, or `false` otherwise
|
BASIC_AUTHENTICATION
act.basic_authentication.enabled turn on/off Basic Authentication
in Act application. |
BUILT_IN_REQ_HANDLER_ENABLED
`built_in_req_handler.enabled` turn on/off built in request
handlers.
|
CACHE_IMPL
act.cache.impl
Specify Cache service provider |
CACHE_NAME
act.cache.name
Specify the default cache name
Default value: `_act_app_` |
CACHE_NAME_SESSION
act.cache.name.session
Specify the session cache name
Default value: the value configured by CACHE_NAME |
CLI_ENABLED
act.cli.enabled
Turn on/off CLI server support
Default value: true |
CLI_OVER_HTTP
`act.cli_over_http.enabled` turn on/off CLI over http feature, which
allows ActFramework to handle http request sent through to the
CLI_OVER_HTTP_PORT
as a way to invoke CLI commands and inspect results
Default value: `false` |
CLI_OVER_HTTP_AUTHORITY
`act.cli_over_http.authority` specifies the
CliOverHttpAuthority implementation |
CLI_OVER_HTTP_PORT
`act.cli_over_http.port` specifies the default cli over http port the application
listen to.
|
CLI_OVER_HTTP_SYS_CMD
`act.cli_over_http.syscmd.enabled` turn on/off system command on CLI Over Http
page
Default value: `true`
|
CLI_OVER_HTTP_TITLE
`act.cli_over_http.port` specify the title to be displayed on the CLI Over Http
page
Default value: "Cli Over Http"
|
CLI_PAGE_SIZE_JSON
act.cli.json.page.size
Specify the maximum records in one page for JSON layout by CLI command
Default value: 10 |
CLI_PAGE_SIZE_TABLE
act.cli.table.page.size
Specify the maximum records in one page for table layout by CLI command
Default value: 22 |
CLI_PORT
act.cli.port specifies the default cli (telnet) port the application
listen to. |
CLI_SESSION_EXPIRATION
cli.session.expiration specifies the number of seconds
a cli session can exists after last user interaction |
CLI_SESSION_MAX
cli.session.max specifies the maximum number of cli threads
can exists concurrently |
CONTENT_SUFFIX_AWARE
act.content_suffix.aware.enabled |
COOKIE_DOMAIN_PROVIDER
`act.cookie.domain_provider.impl` specify the provider
that provides the cookie domain name
Default value: value of
HOST |
COOKIE_PREFIX
cookie.prefix specifies the prefix to be prepended
to the different cookie names e.g. |
CORS
act.cors.enabled turn on/off CORS in Act application
Default value: `false` |
CORS_ALLOW_CREDENTIALS
`act.cors.allow_credential` specifies `Access-Control-Allow-Credential`.
|
CORS_CHECK_OPTION_METHOD
`act.cors.option.check` specify whether the framework should
check the current request is an HTTP OPTION method before applying
controller headers or not
default value: `true`
|
CORS_HEADERS
act.cors.headers specifies both `Access-Control-Expose-Headers`
and `Access-Control-Allow-Headers`
Default value: `Content-Type, X-HTTP-Method-Override` |
CORS_HEADERS_ALLOWED
act.cors.headers.expose specify `Access-Control-Allow-Headers`. |
CORS_HEADERS_EXPOSE
act.cors.headers.expose specify `Access-Control-Expose-Headers`. |
CORS_MAX_AGE
act.cors.max_age specifies `Access-Control-Max-Age`. |
CORS_ORIGIN
act.cors.origin specifies `Access-Control-Allow-Origin` header
to be output
Default value: `*` |
CSRF
act.csrf.enabled turn on/off global CSRF protect
Default value: `true` |
CSRF_COOKIE_NAME
act.csrf.cookie_name specify the name of the cookie used
to convey the csrf token generated on the server for the first GET
request coming from a client. |
CSRF_HEADER_NAME
act.csrf.header_name specifies name of the http request
header used to convey the csrf token sent from AJAX client. |
CSRF_PARAM_NAME
act.csrf.param_name specifies the http request param name
used to convey the csrf token
Default value: the value of ActionContext.ATTR_CSRF_TOKEN |
CSRF_PROTECTOR
`act.csrf.protector.impl` specifies the implementation of
CSRFProtector . |
DB_SEQ_GENERATOR
`act.db.seq_gen.impl` specifies the implementation of
_SequenceNumberGenerator . |
DOUBLE_SUBMISSION_PROTECT_TOKEN
`dsp.token` specifies the name of "double submission protect token"
Default value: `act_dsp_token`
|
ENCODING
act.encoding specifies application default encoding |
ENUM_RESOLVING_CASE_SENSITIVE
`act.enum.resolving.case_sensitive` specifies whether it
allow enum resolving for request parameters to ignore case
Default value: `false` meaning enum resolving is case insensitive
|
FORMAT_DATE
act.fmt.date specifies the default date format used to
lookup/output the date string |
FORMAT_DATE_TIME
act.fmt.date specifies the default date and time format used to
lookup/output the date string |
FORMAT_TIME
act.fmt.time specifies the default time format used to
lookup/output the date time string |
HANDLER_AJAX_CSRF_CHECK_FAILURE
`act.handler.csrf_check_failure.ajax.impl` specifies the implementation for
MissingAuthenticationHandler dealing with the case of AJAX
request
Default value: the value of HANDLER_CSRF_CHECK_FAILURE |
HANDLER_CSRF_CHECK_FAILURE
`act.handler.csrf_check_failure.impl` specifies the implementation
for
MissingAuthenticationHandler
Default value: RedirectToLoginUrl |
HANDLER_MISSING_AUTHENTICATION
handler.missing_authentication.impl specifies the implementation
for MissingAuthenticationHandler |
HANDLER_MISSING_AUTHENTICATION_AJAX
handler.missing_authentication.ajax.impl specifies the implementation
for MissingAuthenticationHandler dealing with the case of AJAX
request |
HANDLER_UNKNOWN_HTTP_METHOD
unknown_http_method_handler specifies a class/instance that
implements UnknownHttpMethodProcessor that process
the HTTP methods that are not recognized by Router ,
e.g. |
HOST
act.host specifies the host the application
reside on. |
HTTP_EXTERNAL_PORT
`act.http.port.external` set the external port which is used to
construct the full url.
|
HTTP_EXTERNAL_SECURE_PORT
`act.http.port.external.secure` set the external secure port which is
used to construct full url string when app is running secure mode
|
HTTP_EXTERNAL_SERVER
`act.http.external_server.enabled` specify if the app is running behind a front end
http server
Default value: `true` when running in PROD mode; `false` when running in DEV mode
|
HTTP_MAX_PARAMS
act.http.params.max specifies the maximum number of http parameters
this is to prevent the hash collision DOS attack |
HTTP_PORT
act.http.port specifies the default http port the application
listen to
|
HTTP_SECURE
act.http.secure specifies whether the default http port is
running https or http. |
HTTPS_PORT
`https.port`
Specify the https port - only effect when
SSL is enabled
Default value: `5443` |
I18N
`act.i18n.enabled` turn on/off i18n tools, e.g.
|
I18N_LOCALE_COOKIE_NAME
`act.i18n.locale.cookie_name` specifies the name for the locale cookie
Default value: `act_locale`
|
I18N_LOCALE_PARAM_NAME
`act.i18n.locale.param_name` specifies the param name to set client locale in http request
Default value: `act_locale`
|
ID_GEN_LONG_ENCODER
|
ID_GEN_NODE_ID_EFFECTIVE_IP_BYTES
act.idgen.node_id.effective_ip_bytes specifies how many bytes in the ip address
will be used to calculate node ID. |
ID_GEN_NODE_ID_PROVIDER
act.idgen.node_id.provider.impl specifies the IdGenerator.NodeIdProvider
implementation for App.idGenerator |
ID_GEN_SEQ_ID_PROVIDER
act.idgen.seq_id.provider.impl specifies the IdGenerator.SequenceProvider
implementation for App.idGenerator |
ID_GEN_START_ID_FILE
act.idgen.start_id.file specifies the start id persistent file for
IdGenerator.StartIdProvider.FileBasedStartCounter |
ID_GEN_START_ID_PROVIDER
act.idgen.start_id.provider.impl specifies the IdGenerator.StartIdProvider
implementation for App.idGenerator |
JOB_POOL_SIZE
job.pool.size specifies the maximum number of threads
can exists in the application's job manager's thread pool |
LOCALE
act.locale specifies the application default locale |
METRIC_ENABLED
act.metric.enabled
Turn on/off metric in Act application
Default value: true |
MODULES
act.modules
Declare additional app base (for maven modules)
Default value: `null` |
NAMED_PORTS
act.namedPorts specifies a list of port names this
application listen to. |
PING_PATH
ping.path specify the ping path. |
PROFILE
profile specifies the profile to load configuration
If this setting is specified, and there is a folder named as
the profile setting sit under /resource/conf
folder, then the properties files will be loaded from
that folder. |
RENDER_JSON_CONTENT_TYPE_IE
`render.json.content_type.ie`
Internet Explorer is know to have an issue with `application/json` content type.
|
RENDER_JSON_OUTPUT_CHARSET
`render.json.output_charset`
Specifies output charset in `application/json` response header `Content-Type`
Default value: `false`
|
RESOLVER_ERROR_TEMPLATE_PATH
resolver.error_template_path.impl specifies error page (template)
path resolver implementation |
RESOLVER_TEMPLATE_PATH
resolver.template_path.impl specifies the class that
implements TemplatePathResolver . |
RESOURCE_PRELOAD_SIZE_LIMIT
`resource.preload.size.limit`
Specifies the maximum number of bytes of a resource that can be preload into memory.
|
SCAN_PACKAGE
scan_package
Specify the app package in which all classes is subject
to bytecode processing, e.g enhancement and injection. |
SECRET
secret
Specifies the secret key the application used to do general
encrypt/decrypt/sign etc |
SECURE_TICKET_CODEC
`secure_ticket_codec`
Specify the implementation of
SecureTicketCodec
Default value: DefaultSecureTicketCodec |
SERVER_HEADER
server.header
Specifies the server header to be output to the response |
SESSION_CODEC
`session.codec.impl` specify the implementation of
SessionCodec
Default value: DefaultSessionCodec |
SESSION_ENCRYPT_ENABLED
session.encrypted.enabled specify whether the system should
encrypt the key/value pairs in the session cookie. |
SESSION_HEADER_PAYLOAD_PREFIX
`session.header.payload.prefix`, set the session payload prefix, e.g.
|
SESSION_HEADER_PREFIX
`session.header.prefix`, specify the prefix of session
header.
|
SESSION_KEY_USERNAME
`act.session.key.username` specifies the session key for username
Default value: `username`
|
SESSION_MAPPER
|
SESSION_MAPPER_HEADER_PREFIX
Deprecated.
|
SESSION_PERSISTENT_ENABLED
session.persistent.enabled
Specify whether the system
should treat session cookie as persistent cookie. |
SESSION_SECURE
session.secure.enabled specifies whether the session cookie should
be set as secure. |
SESSION_TTL
session.ttl specifies the session duration in seconds. |
SOURCE_VERSION
act.source.version specifies the java version
of the src code. |
SSL
`ssl.enabled`
Turn on/off SSL support
Default value: `false`
|
TARGET_VERSION
act.target.version specifies the java version
of the compile target code. |
TEMPLATE_HOME
template.home specifies where the view templates resides. |
UPLOAD_IN_MEMORY_CACHE_THRESHOLD
`upload.in_memory.threshold`
If file upload content length is less than this configuration then
the file will not get written into disk, instead it will get cached
into a in memory byte array
Default value: `1024 * 10`
|
URL_CONTEXT
`act.url.context` specifies the app URL context.
|
URL_LOGIN
url.login specifies the login URL which is used
by RedirectToLoginUrl |
URL_LOGIN_AJAX
url.login.ajax specifies the login URL which is used
by RedirectToLoginUrl when request is AJAX |
VIEW_DEFAULT
act.view.default specifies the default view solution. |
WS_KEY_TICKET
`ws.key.ticket`
Specifies the parameter variable name to get websocket ticket
Default value: `ws_ticket`
|
X_FORWARD_PROTOCOL |
KEY_COMMON_CONF_TAG
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
defVal() |
protected java.lang.Object |
getDefVal(java.util.Map<java.lang.String,?> configuration)
Return default value of this setting.
|
<T> java.util.List<T> |
implList(java.lang.String key,
java.util.Map<java.lang.String,?> configuration,
java.lang.Class<T> c) |
java.lang.String |
key()
Return the key string
|
static void |
onApp(App app) |
java.lang.String |
toString()
Calling to this method is equals to calling
key() |
<T> T |
val(java.util.Map<java.lang.String,?> configuration)
|
static AppConfigKey |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AppConfigKey |
valueOfIgnoreCase(java.lang.String s)
Return key enum instance from the string in case insensitive mode
|
static AppConfigKey[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AppConfigKey API_DOC_EABLED
public static final AppConfigKey BASIC_AUTHENTICATION
act.basic_authentication.enabled
turn on/off Basic Authentication
in Act application.
Default value: `false`
**Note** there is no logic around this configuration in the core
ActFramework. It is up to the security plugins like `act-aaa-plugin`
to favor the value of this settingpublic static final AppConfigKey BUILT_IN_REQ_HANDLER_ENABLED
public static final AppConfigKey CACHE_IMPL
act.cache.impl
Specify Cache service provider
Default value: the simple
in memory map based cache service implementation
public static final AppConfigKey CACHE_NAME
act.cache.name
Specify the default cache name
Default value: `_act_app_`public static final AppConfigKey CACHE_NAME_SESSION
act.cache.name.session
Specify the session cache name
Default value: the value configured by CACHE_NAME
public static final AppConfigKey CLI_ENABLED
act.cli.enabled
Turn on/off CLI server support
Default value: true
public static final AppConfigKey CLI_PORT
act.cli.port
specifies the default cli (telnet) port the application
listen to.
Default value: 5461
public static final AppConfigKey CLI_PAGE_SIZE_JSON
act.cli.json.page.size
Specify the maximum records in one page for JSON layout by CLI command
Default value: 10public static final AppConfigKey CLI_PAGE_SIZE_TABLE
act.cli.table.page.size
Specify the maximum records in one page for table layout by CLI command
Default value: 22public static final AppConfigKey CLI_SESSION_EXPIRATION
cli.session.expiration
specifies the number of seconds
a cli session can exists after last user interaction
Default value: 300
seconds. e.g. 5 minutes
public static final AppConfigKey CLI_SESSION_MAX
cli.session.max
specifies the maximum number of cli threads
can exists concurrently
Default value: 3
public static final AppConfigKey CLI_OVER_HTTP
CLI_OVER_HTTP_PORT
as a way to invoke CLI commands and inspect results
Default value: `false`public static final AppConfigKey CLI_OVER_HTTP_AUTHORITY
CliOverHttpAuthority
implementationpublic static final AppConfigKey CLI_OVER_HTTP_PORT
public static final AppConfigKey CLI_OVER_HTTP_TITLE
public static final AppConfigKey CLI_OVER_HTTP_SYS_CMD
public static final AppConfigKey COOKIE_DOMAIN_PROVIDER
HOST
public static final AppConfigKey COOKIE_PREFIX
cookie.prefix
specifies the prefix to be prepended
to the different cookie names e.g. session cookie, flash cookie,
locale cookie etc. Let's say the default cookie name is
act_session
, and user specifies the prefix my_app
then the session cookie name will be my_app_session
.
Note this setting also impact the AppConfig.flashCookieName()
Default value: act
public static final AppConfigKey CORS
act.cors.enabled
turn on/off CORS in Act application
Default value: `false`public static final AppConfigKey CORS_CHECK_OPTION_METHOD
public static final AppConfigKey CORS_ORIGIN
act.cors.origin
specifies `Access-Control-Allow-Origin` header
to be output
Default value: `*`public static final AppConfigKey CORS_HEADERS
act.cors.headers
specifies both `Access-Control-Expose-Headers`
and `Access-Control-Allow-Headers`
Default value: `Content-Type, X-HTTP-Method-Override`public static final AppConfigKey CORS_HEADERS_EXPOSE
act.cors.headers.expose
specify `Access-Control-Expose-Headers`.
Note this setting will overwrite the setting of CORS_HEADERS
if
it is set
Default value: emptypublic static final AppConfigKey CORS_HEADERS_ALLOWED
act.cors.headers.expose
specify `Access-Control-Allow-Headers`.
Note this setting will overwrite the setting of CORS_HEADERS
if
it is set
Default value: emptypublic static final AppConfigKey CORS_MAX_AGE
act.cors.max_age
specifies `Access-Control-Max-Age`.
Default value: 30*60 (seconds)public static final AppConfigKey CORS_ALLOW_CREDENTIALS
public static final AppConfigKey CONTENT_SUFFIX_AWARE
act.content_suffix.aware.enabled
Once enabled then the framework automatically recognize request with content suffix.
E.g. /customer/123/json
or /customer/123.json
will match the
route /customer/123
and set the request Accept
header to
application/json
Default value: false
public static final AppConfigKey CSRF
act.csrf.enabled
turn on/off global CSRF protect
Default value: `true`public static final AppConfigKey CSRF_PARAM_NAME
act.csrf.param_name
specifies the http request param name
used to convey the csrf token
Default value: the value of ActionContext.ATTR_CSRF_TOKEN
public static final AppConfigKey CSRF_HEADER_NAME
act.csrf.header_name
specifies name of the http request
header used to convey the csrf token sent from AJAX client.
Default value: `X-Xsrf-Token` - the name used by AngularJspublic static final AppConfigKey CSRF_COOKIE_NAME
act.csrf.cookie_name
specify the name of the cookie used
to convey the csrf token generated on the server for the first GET
request coming from a client.
Default value: `XSRF-TOKEN` - the name used by AngularJspublic static final AppConfigKey CSRF_PROTECTOR
CSRFProtector
.
The value of this configuration could be either a name of
the class that implements CSRFProtector
interface, or the enum name of CSRFProtector.Predefined
Default value: `HMAC` which specifies the CSRFProtector.Predefined.HMAC
public static final AppConfigKey DB_SEQ_GENERATOR
_SequenceNumberGenerator
.
Default value: `null`public static final AppConfigKey DOUBLE_SUBMISSION_PROTECT_TOKEN
public static final AppConfigKey ENCODING
act.encoding
specifies application default encoding
Default value: utf-8
public static final AppConfigKey ENUM_RESOLVING_CASE_SENSITIVE
public static final AppConfigKey FORMAT_DATE
act.fmt.date
specifies the default date format used to
lookup/output the date string
Default value: the pattern of java.text.DateFormat.getDateInstance()
public static final AppConfigKey FORMAT_DATE_TIME
act.fmt.date
specifies the default date and time format used to
lookup/output the date string
Default value: the pattern of java.text.DateFormat.getDateTimeInstance()
public static final AppConfigKey FORMAT_TIME
act.fmt.time
specifies the default time format used to
lookup/output the date time string
Default value: the pattern of java.text.DateFormat.getTimeInstance()
public static final AppConfigKey HANDLER_CSRF_CHECK_FAILURE
MissingAuthenticationHandler
Default value: RedirectToLoginUrl
public static final AppConfigKey HANDLER_AJAX_CSRF_CHECK_FAILURE
MissingAuthenticationHandler
dealing with the case of AJAX
request
Default value: the value of HANDLER_CSRF_CHECK_FAILURE
public static final AppConfigKey HANDLER_MISSING_AUTHENTICATION
handler.missing_authentication.impl
specifies the implementation
for MissingAuthenticationHandler
Default value: RedirectToLoginUrl
public static final AppConfigKey HANDLER_MISSING_AUTHENTICATION_AJAX
handler.missing_authentication.ajax.impl
specifies the implementation
for MissingAuthenticationHandler
dealing with the case of AJAX
request
Default value: the value of HANDLER_MISSING_AUTHENTICATION
public static final AppConfigKey HANDLER_UNKNOWN_HTTP_METHOD
unknown_http_method_handler
specifies a class/instance that
implements UnknownHttpMethodProcessor
that process
the HTTP methods that are not recognized by Router
,
e.g. "OPTION", "PATCH" etcpublic static final AppConfigKey HOST
act.host
specifies the host the application
reside on.
Default value: localhost
public static final AppConfigKey HTTP_EXTERNAL_SERVER
public static final AppConfigKey HTTP_MAX_PARAMS
act.http.params.max
specifies the maximum number of http parameters
this is to prevent the hash collision DOS attack
Default value: 128
public static final AppConfigKey HTTP_PORT
act.http.port
specifies the default http port the application
listen to
Default value: 5460
public static final AppConfigKey HTTP_EXTERNAL_PORT
public static final AppConfigKey HTTP_EXTERNAL_SECURE_PORT
HTTP_EXTERNAL_PORT
public static final AppConfigKey HTTP_SECURE
act.http.secure
specifies whether the default http port is
running https or http.
Default value: false
when Act is running in dev mode
or true
when Act is running in prod mode
public static final AppConfigKey HTTPS_PORT
SSL
is enabled
Default value: `5443`public static final AppConfigKey I18N
LocaleResolver
Default value: `false`public static final AppConfigKey I18N_LOCALE_PARAM_NAME
public static final AppConfigKey I18N_LOCALE_COOKIE_NAME
public static final AppConfigKey ID_GEN_NODE_ID_PROVIDER
act.idgen.node_id.provider.impl
specifies the IdGenerator.NodeIdProvider
implementation for App.idGenerator
Default value: IdGenerator.NodeIdProvider.IpProvider
public static final AppConfigKey ID_GEN_NODE_ID_EFFECTIVE_IP_BYTES
act.idgen.node_id.effective_ip_bytes
specifies how many bytes in the ip address
will be used to calculate node ID. Usually in a cluster environment, the ip address will
be different at only (last) one byte or (last) two bytes, in which case it could set this
configuration to 1
or 2
. When the configuration is set to 4
then
it means all 4 IP bytes will be used to calculate the node ID
Default value: 4
public static final AppConfigKey ID_GEN_START_ID_PROVIDER
act.idgen.start_id.provider.impl
specifies the IdGenerator.StartIdProvider
implementation for App.idGenerator
Default value: IdGenerator.StartIdProvider.DefaultStartIdProvider
public static final AppConfigKey ID_GEN_START_ID_FILE
act.idgen.start_id.file
specifies the start id persistent file for
IdGenerator.StartIdProvider.FileBasedStartCounter
Default value: .act.id-app
public static final AppConfigKey ID_GEN_SEQ_ID_PROVIDER
act.idgen.seq_id.provider.impl
specifies the IdGenerator.SequenceProvider
implementation for App.idGenerator
Default value: IdGenerator.SequenceProvider.AtomicLongSeq
public static final AppConfigKey ID_GEN_LONG_ENCODER
act.idgen.encoder.impl
specifies the IdGenerator.LongEncoder
implementation for App.idGenerator
Default value: IdGenerator.SafeLongEncoder
public static final AppConfigKey JOB_POOL_SIZE
job.pool.size
specifies the maximum number of threads
can exists in the application's job manager's thread pool
Default value: 10
public static final AppConfigKey LOCALE
act.locale
specifies the application default locale
Default value: Locale.getDefault()
public static final AppConfigKey METRIC_ENABLED
act.metric.enabled
Turn on/off metric in Act application
Default value: true
public static final AppConfigKey MODULES
act.modules
Declare additional app base (for maven modules)
Default value: `null`public static final AppConfigKey NAMED_PORTS
act.namedPorts
specifies a list of port names this
application listen to. These are additional ports other than
the default HTTP_PORT
The list is specified as
act.namedPorts=admin:8888;ipc:8899
Default value: null
Note, the default port that specified in HTTP_PORT
configuration
and shall not be specified in this namedPorts configuration
public static final AppConfigKey PING_PATH
ping.path
specify the ping path.
If this setting is specified, then when session resolving, system
will check if the current URL matches the setting. If matched
then session cookie expiration time will not be changed. Otherwise
the expiration time will refresh
Default value: null
public static final AppConfigKey PROFILE
profile
specifies the profile to load configuration
If this setting is specified, and there is a folder named as
the profile
setting sit under /resource/conf
folder, then the properties files will be loaded from
that folder.
Default value: the value of the Act.mode()
Note, unlike other configuration items which is usually specified
in the configuration file. profile
setting is load
by System.getProperty(String)
-Dprofile=<profile>
public static final AppConfigKey RENDER_JSON_OUTPUT_CHARSET
public static final AppConfigKey RENDER_JSON_CONTENT_TYPE_IE
public static final AppConfigKey RESOLVER_ERROR_TEMPLATE_PATH
resolver.error_template_path.impl
specifies error page (template)
path resolver implementation
Default value: act.util.ErrorTemplatePathResolver.DefaultErrorTemplatePathResolver
public static final AppConfigKey RESOLVER_TEMPLATE_PATH
resolver.template_path.impl
specifies the class that
implements TemplatePathResolver
. Application
developer could use this configuration to add some flexibility to
template path resolving logic, e.g. different home for different locale
or different home for different device type etc.
Default value: TemplatePathResolver
public static final AppConfigKey RESOURCE_PRELOAD_SIZE_LIMIT
public static final AppConfigKey SCAN_PACKAGE
scan_package
Specify the app package in which all classes is subject
to bytecode processing, e.g enhancement and injection.
This setting should be specified when application loaded.
Otherwise Act will try to process all classes found in
application's lib and classes folder, which might cause
performance issue on loadingpublic static final AppConfigKey SECRET
secret
Specifies the secret key the application used to do general
encrypt/decrypt/sign etc
Default value: myawesomeapp
public static final AppConfigKey SECURE_TICKET_CODEC
SecureTicketCodec
Default value: DefaultSecureTicketCodec
public static final AppConfigKey SERVER_HEADER
server.header
Specifies the server header to be output to the response
Default value: act
public static final AppConfigKey SESSION_TTL
session.ttl
specifies the session duration in seconds.
If user failed to interact with server for amount of time that
exceeds the setting then the session will be destroyed
Default value: 60 * 30
i.e half an hour
public static final AppConfigKey SESSION_PERSISTENT_ENABLED
session.persistent.enabled
Specify whether the system
should treat session cookie as persistent cookie. If this setting
is enabled, then the user's session will not be destroyed after
browser closed.
Default value: false
public static final AppConfigKey SESSION_ENCRYPT_ENABLED
session.encrypted.enabled
specify whether the system should
encrypt the key/value pairs in the session cookie. Enable session
encryption will greatly improve the security but with the cost
of additional CPU usage and a little bit longer time on request
processing.
Default value: false
public static final AppConfigKey SESSION_KEY_USERNAME
public static final AppConfigKey SESSION_MAPPER
public static final AppConfigKey SESSION_CODEC
SessionCodec
Default value: DefaultSessionCodec
@Deprecated public static final AppConfigKey SESSION_MAPPER_HEADER_PREFIX
SESSION_MAPPER
instead.
Default value: `null`public static final AppConfigKey SESSION_HEADER_PREFIX
SESSION_MAPPER
is set
to HeaderTokenSessionMapper
or any
compound session mapper that support it.
Default value: HeaderTokenSessionMapper.DEF_HEADER_PREFIX
public static final AppConfigKey SESSION_HEADER_PAYLOAD_PREFIX
public static final AppConfigKey SESSION_SECURE
session.secure.enabled
specifies whether the session cookie should
be set as secure. Enable secure session will cause session cookie only
effective in https connection. Literally this will enforce the web site to run
default by https.
Default value: true
Note when Act server
is running in mode
session http only will be disabled without regarding to the session.secure.enabled
setting
public static final AppConfigKey SOURCE_VERSION
act.source.version
specifies the java version
of the src code. This configuration is used only
in dev mode.
Default value: 1.7
public static final AppConfigKey SSL
public static final AppConfigKey TARGET_VERSION
act.target.version
specifies the java version
of the compile target code. This configuration is used only
in dev mode.
Default value: 1.7
public static final AppConfigKey TEMPLATE_HOME
template.home
specifies where the view templates resides.
If not specified then will use the view name
in lower case
as the template home if that view is used.
Default value: default
public static final AppConfigKey UPLOAD_IN_MEMORY_CACHE_THRESHOLD
public static final AppConfigKey URL_CONTEXT
public static final AppConfigKey URL_LOGIN
public static final AppConfigKey URL_LOGIN_AJAX
url.login.ajax
specifies the login URL which is used
by RedirectToLoginUrl
when request is AJAX
Default value: the value of URL_LOGIN
public static final AppConfigKey VIEW_DEFAULT
act.view.default
specifies the default view solution. If there
are multiple views registered and default view are available, then
it will be used at priority to load the templates
Default value: rythm
public static final AppConfigKey WS_KEY_TICKET
public static final AppConfigKey X_FORWARD_PROTOCOL
public static AppConfigKey[] values()
for (AppConfigKey c : AppConfigKey.values()) System.out.println(c);
public static AppConfigKey valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static void onApp(App app)
public java.lang.String key()
Return the key string
protected java.lang.Object getDefVal(java.util.Map<java.lang.String,?> configuration)
Return default value of this setting. The configuration data map is passed in in case the default value be variable depending on another setting.
configuration
- public java.lang.String toString()
Calling to this method is equals to calling key()
toString
in class java.lang.Enum<AppConfigKey>
public <T> java.util.List<T> implList(java.lang.String key, java.util.Map<java.lang.String,?> configuration, java.lang.Class<T> c)
public <T> T val(java.util.Map<java.lang.String,?> configuration)
public static AppConfigKey valueOfIgnoreCase(java.lang.String s)
Return key enum instance from the string in case insensitive mode
s
- Copyright © 2014–2017 ActFramework. All rights reserved.