Commit 1405d36b authored by Liang Ding's avatar Liang Ding

Fix #12050

parent bb84ed1b
...@@ -39,7 +39,7 @@ import org.eclipse.jetty.webapp.WebAppContext; ...@@ -39,7 +39,7 @@ import org.eclipse.jetty.webapp.WebAppContext;
* </ul> * </ul>
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.4, Nov 30, 2015 * @version 1.0.0.5, Dec 4, 2015
* @since 1.2.0 * @since 1.2.0
*/ */
public final class Starter { public final class Starter {
...@@ -66,7 +66,7 @@ public final class Starter { ...@@ -66,7 +66,7 @@ public final class Starter {
final CommandLineParser commandLineParser = new DefaultParser(); final CommandLineParser commandLineParser = new DefaultParser();
final CommandLine commandLine = commandLineParser.parse(options, args); final CommandLine commandLine = commandLineParser.parse(options, args);
String portArg = commandLine.getOptionValue("p"); String portArg = commandLine.getOptionValue("p");
if (!Strings.isNumeric(portArg)) { if (!Strings.isNumeric(portArg)) {
portArg = "8080"; portArg = "8080";
...@@ -81,12 +81,13 @@ public final class Starter { ...@@ -81,12 +81,13 @@ public final class Starter {
} }
final int port = Integer.valueOf(portArg); final int port = Integer.valueOf(portArg);
String contextPath = "/";
final ResourceBundle latke = ResourceBundle.getBundle("latke"); final ResourceBundle latke = ResourceBundle.getBundle("latke");
String contextPath = latke.getString("contextPath"); if (latke.containsKey("contextPath")) {
if (Strings.isEmptyOrNull(contextPath)) { if (!Strings.isEmptyOrNull(latke.getString("contextPath"))) {
contextPath = "/"; contextPath = latke.getString("contextPath");
}
} }
Server server = new Server(port); Server server = new Server(port);
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# Description: B3log Latke configurations. Configures the section "Server" carefully. # Description: B3log Latke configurations. Configures the section "Server" carefully.
# Version: 1.3.2.8, Nov 30, 2015 # Version: 1.3.3.8, Dec 4, 2015
# Author: Liang Ding # Author: Liang Ding
# #
...@@ -27,28 +27,21 @@ serverScheme=http ...@@ -27,28 +27,21 @@ serverScheme=http
serverHost=localhost serverHost=localhost
# Browser visit port, 80 as usual, THIS IS NOT SERVER LISTEN PORT! # Browser visit port, 80 as usual, THIS IS NOT SERVER LISTEN PORT!
serverPort=8080 serverPort=8080
############################ DO NOT MODIFY THE FOLLOWING ITEMS IF YOU DON'T UNDERSTAND THEM ############################
#### Context/Static Path ####
# Note: # Note:
# 1. The context path and static path should be "" (empty string) if deploy Solo on ROOT directory # 1. The context path and static path should be "" (empty string) if deploy Solo on ROOT directory
# (e.g. ${tomcat}/webapps/ROOT/). For other cases, starts with '/' and not ends with '/', for example, /blog # (e.g. ${tomcat}/webapps/ROOT/). For other cases, starts with '/' and not ends with '/', for example, /blog if
# deploy Solo on ${tomcat}/webapps/blog
# 2. If running Solo with Standalone mode(https://github.com/b3log/solo/wiki/standalone_mode), do NOT config the # 2. If running Solo with Standalone mode(https://github.com/b3log/solo/wiki/standalone_mode), do NOT config the
# following two items, leaves them with "" (empty string) # following two items, leaves them with "" (empty string)
contextPath= #contextPath=
staticPath= #staticPath=
#### IoC #### #### IoC ####
# See https://github.com/b3log/latke/issues/17 for more details # Do NOT modify this item, see https://github.com/b3log/latke/issues/17 for more details
scanPath=org.b3log.solo scanPath=org.b3log.solo
#### Runtime Environment #### ########################################################################################################################
runtimeEnv=LOCAL \ No newline at end of file
#### Runtime Mode ####
runtimeMode=DEVELOPMENT
#runtimeMode=PRODUCTION
#### Cache Implementation ####
# Note: If the runtime environment is LOCAL, the cache will be 'LOCAL' always
cache=LOCAL
#### User Service Implementation ####
userService=LOCAL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment