Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
add example of use of i18n-admin module in Samplest (related to #179)
- Loading branch information
|
@@ -26,6 +26,7 @@ |
|
|
"io.restx:restx-server-simple:${restx.version}", |
|
|
"io.restx:restx-apidocs:${restx.version}", |
|
|
"io.restx:restx-specs-admin:${restx.version}", |
|
|
"io.restx:restx-i18n-admin:${restx.version}", |
|
|
"ch.qos.logback:logback-classic:${logback.version}" |
|
|
], |
|
|
"runtime": [ |
|
|
|
@@ -25,6 +25,7 @@ |
|
|
<dependency org="io.restx" name="restx-server-simple" rev="latest.integration" conf="default" /> |
|
|
<dependency org="io.restx" name="restx-apidocs" rev="latest.integration" conf="default" /> |
|
|
<dependency org="io.restx" name="restx-specs-admin" rev="latest.integration" conf="default" /> |
|
|
<dependency org="io.restx" name="restx-i18n-admin" rev="latest.integration" conf="default" /> |
|
|
<dependency org="ch.qos.logback" name="logback-classic" rev="1.0.13" conf="default" /> |
|
|
<dependency org="io.restx" name="restx-barbarywatch" rev="latest.integration" conf="runtime->default" /> |
|
|
<dependency org="io.restx" name="restx-specs-tests" rev="latest.integration" conf="test->default" /> |
|
|
|
@@ -80,6 +80,11 @@ |
|
|
<artifactId>restx-specs-admin</artifactId> |
|
|
<version>${restx.version}</version> |
|
|
</dependency> |
|
|
<dependency> |
|
|
<groupId>io.restx</groupId> |
|
|
<artifactId>restx-i18n-admin</artifactId> |
|
|
<version>${restx.version}</version> |
|
|
</dependency> |
|
|
<dependency> |
|
|
<groupId>ch.qos.logback</groupId> |
|
|
<artifactId>logback-classic</artifactId> |
|
|
|
@@ -6,9 +6,11 @@ |
|
|
import restx.admin.AdminModule; |
|
|
import restx.factory.Module; |
|
|
import restx.factory.Provides; |
|
|
import restx.i18n.SupportedLocale; |
|
|
import restx.security.*; |
|
|
|
|
|
import javax.inject.Named; |
|
|
import java.util.Locale; |
|
|
|
|
|
/** |
|
|
* Date: 1/12/13 |
|
@@ -26,6 +28,11 @@ public String appPackage() { |
|
|
return "samplest"; |
|
|
} |
|
|
|
|
|
@Provides |
|
|
public SupportedLocale french() { |
|
|
return new SupportedLocale(Locale.FRENCH); |
|
|
} |
|
|
|
|
|
@Provides |
|
|
public BasicPrincipalAuthenticator basicPrincipalAuthenticator(SecuritySettings securitySettings, |
|
|
final @Named("restx.admin.passwordHash") String adminPasswordHash) { |
|
|
|
|
@@ -0,0 +1 @@ |
|
|
welcome=Welcome!
|
|
|
@@ -0,0 +1 @@ |
|
|
welcome=Bienvenue RESTX !
|