bump: backlib and all microservices to v2.0, add: decoupled auth from identity using new Credential Entity model, still ongoing changes...
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
|
||||
<parent>
|
||||
<groupId>net.miarma.api</groupId>
|
||||
<artifactId>miarma-ecosystem</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<artifactId>miarma-backend</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bootstrap</artifactId>
|
||||
@@ -51,7 +51,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.miarma.api</groupId>
|
||||
<artifactId>miarmacraft</artifactId>
|
||||
<artifactId>minecraft</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package net.miarma.api;
|
||||
|
||||
import net.miarma.api.backlib.ConfigManager;
|
||||
import net.miarma.api.backlib.Constants;
|
||||
import net.miarma.api.backlib.security.SecretManager;
|
||||
import net.miarma.api.backlib.vertx.VertxJacksonConfig;
|
||||
import net.miarma.api.backlib.util.MessageUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import io.vertx.core.Launcher;
|
||||
import net.miarma.api.backlib.config.ConfigManager;
|
||||
import net.miarma.api.backlib.log.LoggerProvider;
|
||||
import net.miarma.api.backlib.security.SecretManager;
|
||||
import net.miarma.api.backlib.util.MessageUtil;
|
||||
import net.miarma.api.backlib.vertx.VertxJacksonConfig;
|
||||
|
||||
/**
|
||||
* Punto de entrada para inicializar la aplicación.
|
||||
@@ -24,12 +25,13 @@ import io.vertx.core.Launcher;
|
||||
* - Desplegar el Verticle Master
|
||||
*/
|
||||
public class AppInitializer {
|
||||
private final static Logger LOGGER = LoggerProvider.getLogger();
|
||||
|
||||
public static void main(String[] args) {
|
||||
AppInitializer initializer = new AppInitializer();
|
||||
initializer.init();
|
||||
initializer.deployMaster();
|
||||
Constants.LOGGER.info("✅ App initialized successfully!");
|
||||
LOGGER.info("✅ App initialized successfully!");
|
||||
}
|
||||
|
||||
private final ConfigManager configManager;
|
||||
@@ -49,7 +51,7 @@ public class AppInitializer {
|
||||
private void initializeDirectories() {
|
||||
File baseDir = new File(configManager.getBaseDir());
|
||||
if (!baseDir.exists() && baseDir.mkdirs()) {
|
||||
Constants.LOGGER.info("Created base directory: " + baseDir.getAbsolutePath());
|
||||
LOGGER.info("Created base directory: " + baseDir.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,12 +61,12 @@ public class AppInitializer {
|
||||
try (InputStream in = getClass().getClassLoader().getResourceAsStream("default.properties")) {
|
||||
if (in != null) {
|
||||
Files.copy(in, configFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
Constants.LOGGER.info("Copied default.properties to: " + configFile.getAbsolutePath());
|
||||
LOGGER.info("Copied default.properties to: " + configFile.getAbsolutePath());
|
||||
} else {
|
||||
Constants.LOGGER.error(MessageUtil.notFound("Default config", "resources"));
|
||||
LOGGER.error(MessageUtil.notFound("Default config", "resources"));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Constants.LOGGER.error(MessageUtil.failedTo("copy", "default config", e));
|
||||
LOGGER.error(MessageUtil.failedTo("copy", "default config", e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,36 @@
|
||||
package net.miarma.api;
|
||||
|
||||
import java.util.Set;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import io.vertx.core.AbstractVerticle;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Promise;
|
||||
import net.miarma.api.backlib.Constants;
|
||||
import net.miarma.api.backlib.LogAccumulator;
|
||||
import net.miarma.api.backlib.log.LogAccumulator;
|
||||
import net.miarma.api.backlib.log.LoggerProvider;
|
||||
import net.miarma.api.backlib.util.DeploymentUtil;
|
||||
import net.miarma.api.microservices.core.verticles.CoreMainVerticle;
|
||||
import net.miarma.api.microservices.huertos.verticles.HuertosMainVerticle;
|
||||
import net.miarma.api.microservices.huertosdecine.verticles.CineMainVerticle;
|
||||
import net.miarma.api.microservices.miarmacraft.verticles.MMCMainVerticle;
|
||||
import net.miarma.api.microservices.minecraft.verticles.MMCMainVerticle;
|
||||
import net.miarma.api.microservices.mpaste.verticles.MPasteMainVerticle;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MasterVerticle extends AbstractVerticle {
|
||||
private final Logger LOGGER = LoggerProvider.getLogger();
|
||||
|
||||
@Override
|
||||
public void start(Promise<Void> startPromise) {
|
||||
deploy()
|
||||
.onSuccess(v -> {
|
||||
vertx.setTimer(300, id -> {
|
||||
LogAccumulator.flushToLogger(Constants.LOGGER);
|
||||
LogAccumulator.flushToLogger(LOGGER);
|
||||
startPromise.complete();
|
||||
});
|
||||
})
|
||||
.onFailure(startPromise::fail);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private Future<Void> deploy() {
|
||||
Promise<Void> promise = Promise.promise();
|
||||
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
# App Configuration
|
||||
app.name=miarma-backend
|
||||
app.version=v2
|
||||
|
||||
# API Configuration
|
||||
api.base=/api
|
||||
|
||||
api.core.prefix=/core/${app.version}
|
||||
api.auth.prefix=/auth/${app.version}
|
||||
api.huertos.prefix=/huertos/${app.version}
|
||||
api.minecraft.prefix=/minecraft/${app.version}
|
||||
api.cine.prefix=/cine/${app.version}
|
||||
api.mpaste.prefix=/mpaste/${app.version}
|
||||
|
||||
# EventBus Configuration
|
||||
eventbus.auth.address=auth.eventbus
|
||||
eventbus.core.address=core.eventbus
|
||||
eventbus.huertos.address=huertos.eventbus
|
||||
eventbus.minecraft.address=minecraft.eventbus
|
||||
eventbus.cine.address=cine.eventbus
|
||||
eventbus.mpaste.address=mpaste.eventbus
|
||||
|
||||
# DB Configuration
|
||||
db.protocol=jdbc:mariadb
|
||||
db.host=localhost
|
||||
@@ -11,8 +33,8 @@ dp.poolSize=5
|
||||
inet.host=localhost
|
||||
sso.logic.port=8080
|
||||
sso.data.port=8081
|
||||
mmc.logic.port=8100
|
||||
mmc.data.port=8101
|
||||
minecraft.logic.port=8100
|
||||
minecraft.data.port=8101
|
||||
huertos.logic.port=8120
|
||||
huertos.data.port=8121
|
||||
cine.data.port = 8140
|
||||
|
||||
Reference in New Issue
Block a user