Commit 069d11a6 authored by Liang Ding's avatar Liang Ding

🎨 升级 Lakte 2.3.13

parent 7d44435d
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Description: Solo POM. Description: Solo POM.
Version: 3.17.1.41, Jun 27, 2017 Version: 3.17.1.42, Jul 8, 2017
Author: <a href="http://88250.b3log.org">Liang Ding</a> Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a> Author: <a href="http://www.annpeter.cn">Ann Peter</a>
Author: <a href="http://vanessa.b3log.org">Vanessa</a> Author: <a href="http://vanessa.b3log.org">Vanessa</a>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.b3log.latke.version>2.3.12</org.b3log.latke.version> <org.b3log.latke.version>2.3.13</org.b3log.latke.version>
<servlet.version>3.1.0</servlet.version> <servlet.version>3.1.0</servlet.version>
<slf4j.version>1.7.5</slf4j.version> <slf4j.version>1.7.5</slf4j.version>
......
...@@ -138,7 +138,7 @@ public final class Starter { ...@@ -138,7 +138,7 @@ public final class Starter {
Latkes.setStaticServerPort(staticServerPort); Latkes.setStaticServerPort(staticServerPort);
String runtimeMode = commandLine.getOptionValue("runtime_mode"); String runtimeMode = commandLine.getOptionValue("runtime_mode");
if (null != runtimeMode) { if (null != runtimeMode) {
Latkes.setRuntimeMode(RuntimeMode.valueOf(runtimeMode)); Latkes.setRuntimeMode(Latkes.RuntimeMode.valueOf(runtimeMode));
} }
Latkes.setScanPath("org.b3log.solo"); // For Latke IoC Latkes.setScanPath("org.b3log.solo"); // For Latke IoC
......
...@@ -77,7 +77,7 @@ public class ArticleGenerator { ...@@ -77,7 +77,7 @@ public class ArticleGenerator {
@RequestProcessing(value = "/dev/articles/gen/*", method = HTTPRequestMethod.GET) @RequestProcessing(value = "/dev/articles/gen/*", method = HTTPRequestMethod.GET)
public void genArticles(final HTTPRequestContext context, final HttpServletRequest request, final HttpServletResponse response) public void genArticles(final HTTPRequestContext context, final HttpServletRequest request, final HttpServletResponse response)
throws IOException { throws IOException {
if (RuntimeMode.DEVELOPMENT != Latkes.getRuntimeMode()) { if (Latkes.RuntimeMode.DEVELOPMENT != Latkes.getRuntimeMode()) {
LOGGER.log(Level.WARN, "Article generation just for development mode, " + "current runtime mode is [{0}]", LOGGER.log(Level.WARN, "Article generation just for development mode, " + "current runtime mode is [{0}]",
Latkes.getRuntimeMode()); Latkes.getRuntimeMode());
response.sendRedirect(Latkes.getServePath()); response.sendRedirect(Latkes.getServePath());
......
...@@ -233,8 +233,8 @@ public class AdminConsole { ...@@ -233,8 +233,8 @@ public class AdminConsole {
final Map<String, String> langs = langPropsService.getAll(locale); final Map<String, String> langs = langPropsService.getAll(locale);
final Map<String, Object> dataModel = renderer.getDataModel(); final Map<String, Object> dataModel = renderer.getDataModel();
dataModel.put("supportExport", RuntimeDatabase.MYSQL == Latkes.getRuntimeDatabase() dataModel.put("supportExport", Latkes.RuntimeDatabase.MYSQL == Latkes.getRuntimeDatabase()
|| RuntimeDatabase.H2 == Latkes.getRuntimeDatabase()); || Latkes.RuntimeDatabase.H2 == Latkes.getRuntimeDatabase());
dataModel.putAll(langs); dataModel.putAll(langs);
Keys.fillRuntime(dataModel); Keys.fillRuntime(dataModel);
dataModel.put(Option.ID_C_LOCALE_STRING, locale.toString()); dataModel.put(Option.ID_C_LOCALE_STRING, locale.toString());
...@@ -310,9 +310,8 @@ public class AdminConsole { ...@@ -310,9 +310,8 @@ public class AdminConsole {
return; return;
} }
final RuntimeDatabase runtimeDatabase = Latkes.getRuntimeDatabase(); final Latkes.RuntimeDatabase runtimeDatabase = Latkes.getRuntimeDatabase();
if (Latkes.RuntimeDatabase.H2 != runtimeDatabase && Latkes.RuntimeDatabase.MYSQL != runtimeDatabase) {
if (RuntimeDatabase.H2 != runtimeDatabase && RuntimeDatabase.MYSQL != runtimeDatabase) {
context.renderJSON().renderMsg("Just support MySQL/H2 export now"); context.renderJSON().renderMsg("Just support MySQL/H2 export now");
return; return;
...@@ -323,7 +322,7 @@ public class AdminConsole { ...@@ -323,7 +322,7 @@ public class AdminConsole {
final String dbURL = Latkes.getLocalProperty("jdbc.URL"); final String dbURL = Latkes.getLocalProperty("jdbc.URL");
String sql; // exported SQL script String sql; // exported SQL script
if (RuntimeDatabase.MYSQL == runtimeDatabase) { if (Latkes.RuntimeDatabase.MYSQL == runtimeDatabase) {
String db = StringUtils.substringAfterLast(dbURL, "/"); String db = StringUtils.substringAfterLast(dbURL, "/");
db = StringUtils.substringBefore(db, "?"); db = StringUtils.substringBefore(db, "?");
...@@ -339,7 +338,7 @@ public class AdminConsole { ...@@ -339,7 +338,7 @@ public class AdminConsole {
return; return;
} }
} else if (RuntimeDatabase.H2 == runtimeDatabase) { } else if (Latkes.RuntimeDatabase.H2 == runtimeDatabase) {
final Connection connection = Connections.getConnection(); final Connection connection = Connections.getConnection();
final Statement statement = connection.createStatement(); final Statement statement = connection.createStatement();
......
...@@ -204,7 +204,7 @@ public class InitService { ...@@ -204,7 +204,7 @@ public class InitService {
LOGGER.log(Level.INFO, "Solo is running with database [{0}], creates all tables", Latkes.getRuntimeDatabase()); LOGGER.log(Level.INFO, "Solo is running with database [{0}], creates all tables", Latkes.getRuntimeDatabase());
if (RuntimeDatabase.H2 == Latkes.getRuntimeDatabase()) { if (Latkes.RuntimeDatabase.H2 == Latkes.getRuntimeDatabase()) {
String dataDir = Latkes.getLocalProperty("jdbc.URL"); String dataDir = Latkes.getLocalProperty("jdbc.URL");
dataDir = dataDir.replace("~", System.getProperty("user.home")); dataDir = dataDir.replace("~", System.getProperty("user.home"));
LOGGER.log(Level.INFO, "YOUR DATA will be stored in directory [" + dataDir + "], " LOGGER.log(Level.INFO, "YOUR DATA will be stored in directory [" + dataDir + "], "
......
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