Merge pull request #1226 from vorburger/MIFOSX-1756_UseAppsInsteadWebAndDocUpdate
MIFOSX-1756 Follow-up, switched to using (existing) /apps/ instead /web/...
This commit is contained in:
+13
-5
@@ -6,10 +6,18 @@ Depending on the OS you're running, you should have "runmifosx.sh" (for Linux an
|
|||||||
run MifosX on your computer locally. To be able to run MifosX, just double-click on the script,
|
run MifosX on your computer locally. To be able to run MifosX, just double-click on the script,
|
||||||
that is, "runmifosx.sh" if you are on Linux or Mac, or "runmifosx.bat" if you are on Windows.
|
that is, "runmifosx.sh" if you are on Linux or Mac, or "runmifosx.bat" if you are on Windows.
|
||||||
|
|
||||||
Note
|
|
||||||
====
|
|
||||||
If you have a web front-end that you want to use along with the backend server, put your index.html
|
If you have a web front-end that you want to use along with the backend server, put your index.html
|
||||||
inside the "web" folder along with all the other source files.
|
along with all the other source files inside a (sub-folder of) the "apps" folder in the current
|
||||||
P.S.: the index.html should be in the "web" folder itself
|
directory from where runmifosx.bat/.sh is launched. The web UI front-end is then accessible
|
||||||
|
under mifosng-provider/apps - for example:
|
||||||
|
|
||||||
We hope you'll have an amazing experience working with MifosX.
|
https://localhost:8443/mifosng-provider/apps/community-app/index.html
|
||||||
|
|
||||||
|
We hope you'll have an amazing experience working with MifosX!
|
||||||
|
|
||||||
|
|
||||||
|
PS, internal note to Mifos developers preparing packages, only: For this to work, the WAR of
|
||||||
|
the Mifos X distribution ZIP package will (currently) have to be built using
|
||||||
|
the Gradle 'dev' environment profile - e.g. using this command:
|
||||||
|
|
||||||
|
./gradlew -Penv=dev clean war dist
|
||||||
|
|||||||
+3
-2
@@ -40,12 +40,13 @@ public class ServerWithMariaDB4jApplication {
|
|||||||
ConfigurableApplicationContext ctx = SpringApplication.run(Configuration.class, args);
|
ConfigurableApplicationContext ctx = SpringApplication.run(Configuration.class, args);
|
||||||
if (Desktop.isDesktopSupported()) {
|
if (Desktop.isDesktopSupported()) {
|
||||||
Resource resource = ctx.getResource("file:" + System.getProperty("user.dir") +
|
Resource resource = ctx.getResource("file:" + System.getProperty("user.dir") +
|
||||||
System.getProperty("file.separator") + "web" +
|
System.getProperty("file.separator") + "apps" +
|
||||||
|
System.getProperty("file.separator") + "community-app" +
|
||||||
System.getProperty("file.separator") + "index.html");
|
System.getProperty("file.separator") + "index.html");
|
||||||
if (resource.exists()) {
|
if (resource.exists()) {
|
||||||
try {
|
try {
|
||||||
Desktop.getDesktop().browse(URI.create("https://localhost:8443/mifosng-provider" +
|
Desktop.getDesktop().browse(URI.create("https://localhost:8443/mifosng-provider" +
|
||||||
"/web/index.html?baseApiUrl=https://localhost:8443" +
|
"/apps/community-app/index.html?baseApiUrl=https://localhost:8443" +
|
||||||
"&tenantIdentifier=default#/"));
|
"&tenantIdentifier=default#/"));
|
||||||
} catch (IOException e) {}
|
} catch (IOException e) {}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -16,9 +16,9 @@ public class WebFrontEndConfiguration extends WebMvcConfigurerAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||||
registry.addResourceHandler("/web/**").addResourceLocations("file:" +
|
registry.addResourceHandler("/apps/**").addResourceLocations("file:" +
|
||||||
System.getProperty("user.dir") + System.getProperty("file.separator") +
|
System.getProperty("user.dir") + System.getProperty("file.separator") +
|
||||||
"web" + System.getProperty("file.separator"));
|
"apps" + System.getProperty("file.separator"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user