logging resource bundle load

This commit is contained in:
anhefti 2019-09-04 16:01:04 +02:00
parent e195007c82
commit c4b6f85035
3 changed files with 27 additions and 1 deletions

View file

@ -4,7 +4,6 @@ server.port=8080
server.servlet.context-path=/
server.servlet.session.cookie.http-only=true
server.servlet.session.tracking-modes=cookie
spring.messages.basename=file:/sebserver/messages
# database server
datastore.mariadb.server.address=seb-server-mariadb

View file

@ -14,6 +14,8 @@ import javax.servlet.ServletException;
import org.eclipse.rap.rwt.engine.RWTServlet;
import org.eclipse.rap.rwt.engine.RWTServletContextListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
@ -29,6 +31,8 @@ import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
@GuiProfile
public class RAPSpringConfig {
private static final Logger log = LoggerFactory.getLogger(RAPSpringConfig.class);
@Value("${sebserver.gui.entrypoint}")
private String entrypoint;
@ -58,6 +62,8 @@ public class RAPSpringConfig {
final ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource =
new ReloadableResourceBundleMessageSource();
log.info(" +++ Register external messages resources form: {}", this.externalMessagesPath);
reloadableResourceBundleMessageSource.setBasenames(
this.externalMessagesPath,
"classpath:messages");

View file

@ -305,6 +305,27 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
new GetUserAccount(),
new GetUserAccountNames());
final String instId = restService.getBuilder(GetInstitutionNames.class)
.call()
.getOrThrow()
.stream()
.filter(inst -> "Test Institution".equals(inst.name))
.findFirst()
.get().modelId;
assertNotNull(instId);
final Result<UserInfo> result = restService.getBuilder(NewUserAccount.class)
.withFormParam(Domain.USER.ATTR_INSTITUTION_ID, instId)
.withFormParam(Domain.USER.ATTR_NAME, "TestInstAdmin")
.withFormParam(Domain.USER.ATTR_USERNAME, "TestInstAdmin")
.withFormParam(Domain.USER.ATTR_EMAIL, "test@test.ch")
.withFormParam(Domain.USER_ROLE.REFERENCE_NAME, UserRole.INSTITUTIONAL_ADMIN.name())
.withFormParam(PasswordChange.ATTR_NAME_NEW_PASSWORD, "12345678")
.withFormParam(PasswordChange.ATTR_NAME_CONFIRM_NEW_PASSWORD, "12345678")
.withFormParam(Domain.USER.ATTR_LANGUAGE, Locale.ENGLISH.getLanguage())
.withFormParam(Domain.USER.ATTR_TIMEZONE, DateTimeZone.UTC.getID())
.call();
}
@Test