updated configuration

This commit is contained in:
anhefti 2019-12-10 16:32:39 +01:00
parent 9f752bf145
commit 4023e0ac4d
6 changed files with 21 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -42,6 +42,12 @@ public class I18nSupportImpl implements I18nSupport {
private static final Logger log = LoggerFactory.getLogger(I18nSupportImpl.class);
private static final String SUPPORTED_LANGUAGES_KEY = "sebserver.gui.supported.languages";
private static final String MULTILINGUAL_KEY = "sebserver.gui.multilingual";
private static final String TIME_DISPLAYFORMAT_KEY = "sebserver.gui.time.displayformat";
private static final String DATETIME_DISPLAYFORMAT_KEY = "sebserver.gui.datetime.displayformat";
private static final String DATE_DISPLAYFORMAT_KEY = "sebserver.gui.date.displayformat";
private static final String DATE_DISPLAYFORMAT_TIMEZONE_KEY = "sebserver.gui.date.displayformat.timezone";
private static final String ATTR_CURRENT_SESSION_LOCALE = "CURRENT_SESSION_LOCALE";
private final DateTimeFormatter timeZoneFormatter;
@ -63,33 +69,33 @@ public class I18nSupportImpl implements I18nSupport {
this.timeZoneFormatter = DateTimeFormat
.forPattern(environment.getProperty(
"sebserver.gui.date.displayformat.timezone",
DATE_DISPLAYFORMAT_TIMEZONE_KEY,
Constants.TIME_ZONE_OFFSET_TAIL_FORMAT));
this.displayDateFormatter = DateTimeFormat
.forPattern(environment.getProperty(
"sebserver.gui.date.displayformat",
DATE_DISPLAYFORMAT_KEY,
Constants.DEFAULT_DISPLAY_DATE_FORMAT))
.withZoneUTC();
this.displayDateTimeFormatter = DateTimeFormat
.forPattern(environment.getProperty(
"sebserver.gui.datetime.displayformat",
DATETIME_DISPLAYFORMAT_KEY,
Constants.DEFAULT_DIPLAY_DATE_TIME_FORMAT))
.withZoneUTC();
this.displayTimeFormatter = DateTimeFormat
.forPattern(environment.getProperty(
"sebserver.gui.time.displayformat",
TIME_DISPLAYFORMAT_KEY,
Constants.DEFAULT_TIME_FORMAT))
.withZoneUTC();
final boolean multilingual = BooleanUtils.toBoolean(environment.getProperty(
"sebserver.gui.multilingual",
"false"));
MULTILINGUAL_KEY,
Constants.FALSE_STRING));
if (multilingual) {
final String languagesString = environment.getProperty(
"sebserver.gui.languages",
SUPPORTED_LANGUAGES_KEY,
Locale.ENGLISH.getLanguage());
this.supportedLanguages = Utils.immutableCollectionOf(

View file

@ -35,9 +35,9 @@ public class WebserviceInfo {
private static final String VERSION_KEY = "sebserver.version";
private static final String WEB_SERVICE_TEST_PROPERTY = "sebserver.test.property";
private static final String WEB_SERVICE_SERVER_NAME_KEY = "sebserver.webservice.http.server.name";
private static final String WEB_SERVICE_SERVER_NAME_KEY = "sebserver.webservice.http.external.servername";
private static final String WEB_SERVICE_HTTP_SCHEME_KEY = "sebserver.webservice.http.scheme";
private static final String WEB_SERVICE_HTTP_PORT = "sebserver.webservice.http.port";
private static final String WEB_SERVICE_HTTP_PORT = "sebserver.webservice.http.external.port";
private static final String WEB_SERVICE_HOST_ADDRESS_KEY = "server.address";
private static final String WEB_SERVICE_SERVER_PORT_KEY = "server.port";
private static final String WEB_SERVICE_EXAM_API_DISCOVERY_ENDPOINT_KEY =

View file

@ -2,9 +2,6 @@ server.address=localhost
server.port=8080
server.servlet.context-path=/
server.servlet.session.cookie.http-only=true
server.servlet.session.tracking-modes=cookie
sebserver.gui.entrypoint=/gui
sebserver.gui.webservice.protocol=http
sebserver.gui.webservice.address=localhost
@ -20,7 +17,7 @@ sebserver.gui.list.page.size=15
sebserver.gui.date.displayformat=yyyy-MM-dd HH:mm
sebserver.gui.date.displayformat.timezone=|ZZ
sebserver.gui.multilingual=false
sebserver.gui.languages=en,de
sebserver.gui.supported.languages=en,de
sebserver.gui.seb.client.config.download.filename=SEBClientSettings.seb
sebserver.gui.seb.exam.config.download.filename=SEBExamSettings.seb

View file

@ -23,8 +23,8 @@ sebserver.http.client.read-timeout=10000
sebserver.init.adminaccount.gen-on-init=false
sebserver.webservice.distributed=false
sebserver.webservice.http.scheme=http
sebserver.webservice.http.server.name=${server.address}
#sebserver.webservice.http.port=${server.port}
sebserver.webservice.http.external.servername=${server.address}
#sebserver.webservice.http.external.port=${server.port}
sebserver.webservice.http.redirect.gui=/gui
sebserver.webservice.api.admin.endpoint=/admin-api/v1
sebserver.webservice.api.admin.accessTokenValiditySeconds=3600

View file

@ -6,8 +6,10 @@ spring.mandatory-file-encoding=UTF-8
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
server.servlet.session.cookie.http-only=true
server.servlet.session.tracking-modes=cookie
sebserver.version=0.5.1 beta
sebserver.supported.languages=en
sebserver.init.organisation.name=ETHZ
sebserver.init.adminaccount.gen-on-init=true
sebserver.init.adminaccount.username=super-admin