Add initial postgres support; internal webserver works perfectly

This commit is contained in:
baconwaifu 2019-08-15 00:51:21 -04:00
parent fadfe1ba09
commit 8522015edc
2 changed files with 1056 additions and 0 deletions

View File

@ -57,6 +57,7 @@ import org.dynmap.storage.filetree.FileTreeMapStorage;
import org.dynmap.storage.mysql.MySQLMapStorage;
import org.dynmap.storage.mariadb.MariaDBMapStorage;
import org.dynmap.storage.sqllte.SQLiteMapStorage;
import org.dynmap.storage.postgresql.PostgreSQLMapStorage;
import org.dynmap.utils.BlockStep;
import org.dynmap.utils.ImageIOManager;
import org.dynmap.web.BanIPFilter;
@ -388,6 +389,9 @@ public class DynmapCore implements DynmapCommonAPI {
else if (storetype.equals("mariadb")) {
defaultStorage = new MariaDBMapStorage();
}
else if (storetype.equals("postgres") || storetype.equals("postgresql")) {
defaultStorage = new PostgreSQLMapStorage();
}
else {
Log.severe("Invalid storage type for map data: " + storetype);
return false;

File diff suppressed because it is too large Load Diff