Intial commit
This commit is contained in:
parent
7329fb8dea
commit
73f201bdac
268 changed files with 11220 additions and 5 deletions
29
no2all-zerofungus/conf/logback-server-console.xml
Normal file
29
no2all-zerofungus/conf/logback-server-console.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="90 seconds" debug="false">
|
||||
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
|
||||
<resetJUL>true</resetJUL>
|
||||
</contextListener>
|
||||
<jmxConfigurator/>
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>logs/no2all-demo.log</file>
|
||||
<encoder>
|
||||
<pattern>%date %level [%thread] %logger{10} %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%date %level [%thread] %logger{10} %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="DEBUG">
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
|
||||
<!-- Package opens. -->
|
||||
<logger level="DEBUG" name="love.distributedrebirth.no2all.react.warp"/>
|
||||
|
||||
<!-- Package limits. -->
|
||||
<logger level="INFO" name="org.eclipse.jetty"/>
|
||||
|
||||
</configuration>
|
||||
23
no2all-zerofungus/conf/logback-server.xml
Normal file
23
no2all-zerofungus/conf/logback-server.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="90 seconds">
|
||||
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
|
||||
<resetJUL>true</resetJUL>
|
||||
</contextListener>
|
||||
<jmxConfigurator/>
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>logs/no2all-demo.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>logs/no2all-demo-%d{yyyy-MM-dd}.log.zip</fileNamePattern>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%date %level [%thread] %logger{10} %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
|
||||
<!-- Package limits. -->
|
||||
<logger level="INFO" name="org.eclipse.jetty"/>
|
||||
|
||||
</configuration>
|
||||
54
no2all-zerofungus/pom.xml
Normal file
54
no2all-zerofungus/pom.xml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.no2all</groupId>
|
||||
<artifactId>no2all</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>no2all-zerofungus</artifactId>
|
||||
<name>No2All-ZeroFungus</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>no2all-react-nostr</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>no2all-wire-jetty</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jul-to-slf4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>log4j-over-slf4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>jquery</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>jquery-validation</artifactId>
|
||||
<version>1.19.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package love.distributedrebirth.no2all.zerofungus;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlot;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotLoad;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotSignal;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactTypeScript;
|
||||
|
||||
public class ZFunServer implements No2AllReactTypeScript {
|
||||
|
||||
public static final No2AllReactSlot API = No2AllReactSlot.ofClass(ZFunServer.class);
|
||||
private static final Logger logger = Logger.getLogger(ZFunServer.class.getName());
|
||||
|
||||
@Override
|
||||
public void onEvent(No2AllReactSlotSignal<No2AllReactSlotLoad> signal) {
|
||||
signal.getReact().claim(API);
|
||||
|
||||
// TODO: reg and refire events
|
||||
|
||||
logger.info("╔═╗┌─┐┬─┐┌─┐ .╔═╗┬ ┬┌┐┌╔═╗┬ ┬┌─┐");
|
||||
logger.info("╔═╝├┤ ├┬┘│ │ . ╠╣ │ ││││║ ╦│ │└─┐");
|
||||
logger.info("╚═╝└─┘┴└─└─┘. ╚ └─┘┘└┘╚═╝└─┘└─┘");
|
||||
logger.info("Boot done.");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package love.distributedrebirth.no2all.zerofungus;
|
||||
|
||||
import love.distributedrebirth.no2all.react.warp.No2AllReactWarpCore;
|
||||
import love.distributedrebirth.no2all.react.warp.No2AllRtsWarpSpeedMonitor;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllRtsServer;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllRtsServerLog;
|
||||
import love.distributedrebirth.no2all.zerofungus.service.ZFunRtsConfigJetty;
|
||||
import love.distributedrebirth.no2all.zerofungus.service.ZFunRtsConfigLogger;
|
||||
//import ᒢᐩᐩ.ᔿᐤᒄʸ.ᣔᒃᣔᒼᓑᔆ.BãßBȍőnAbacusInstanceMBeanʸᴰ;
|
||||
import love.distributedrebirth.no2all.zerofungus.service.ZFunRtsInitJdbc;
|
||||
|
||||
public enum ZeroFungus /*implements BãßBȍőnAbacusInstanceMBeanʸᴰ<ZeroFungus>*/ {
|
||||
INSTANCE;
|
||||
|
||||
private No2AllReactWarpCore foei = new No2AllReactWarpCore();
|
||||
|
||||
public static void main(String[] args) {
|
||||
INSTANCE.start();
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
//foei.fire(No2AllReactWarpCore.DILITHIUM, new Object());
|
||||
}
|
||||
|
||||
public void start() {
|
||||
foei.load(new ZFunRtsConfigLogger());
|
||||
foei.load(new No2AllRtsWarpSpeedMonitor());
|
||||
foei.load(new No2AllRtsServer());
|
||||
foei.load(new No2AllRtsServerLog());
|
||||
foei.load(ZFunRtsConfigJetty.INSTANCE);
|
||||
foei.load(new ZFunRtsInitJdbc(foei));
|
||||
foei.load(new ZFunServer());
|
||||
|
||||
ZFunRtsConfigJetty.INSTANCE.join();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
package love.distributedrebirth.no2all.zerofungus.service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.eclipse.jetty.annotations.AnnotationConfiguration;
|
||||
import org.eclipse.jetty.server.CustomRequestLog;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.servlet.DefaultServlet;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.util.component.LifeCycle;
|
||||
import org.eclipse.jetty.util.component.LifeCycle.Listener;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.util.resource.ResourceCollection;
|
||||
import org.eclipse.jetty.webapp.Configuration;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.eclipse.jetty.webapp.WebInfConfiguration;
|
||||
import org.eclipse.jetty.websocket.server.config.JettyWebSocketServletContainerInitializer;
|
||||
|
||||
import love.distributedrebirth.no2all.react.No2AllReact;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlot;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotLoad;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotSignal;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactTypeScript;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllActServer;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllActServerSocketSendMessage;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllArtServer;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllArtServerSocket;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllArtServerSocketOnMessage;
|
||||
import love.distributedrebirth.no2all.react.wire.server.No2AllRtsServer;
|
||||
import love.distributedrebirth.no2all.wire.jetty.JettyWireServerEndpoint;
|
||||
import love.distributedrebirth.no2all.zerofungus.web.RedirectServlet;
|
||||
|
||||
public enum ZFunRtsConfigJetty implements No2AllReactTypeScript {
|
||||
INSTANCE;
|
||||
|
||||
public static final No2AllReactSlot API = No2AllReactSlot.ofClass(ZFunRtsConfigJetty.class);
|
||||
private static final Logger logger = Logger.getLogger(ZFunRtsConfigJetty.class.getName());
|
||||
private final Server server;
|
||||
private final ServerConnector connector;
|
||||
private JettyWireServerEndpoint endpoint1;
|
||||
private JettyWireServerEndpoint endpoint2;
|
||||
private JettyWireServerEndpoint endpoint3;
|
||||
|
||||
private ZFunRtsConfigJetty() {
|
||||
server = new Server();
|
||||
connector = new ServerConnector(server);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(No2AllReactSlotSignal<No2AllReactSlotLoad> signal) {
|
||||
logger.info(" ╦┌─┐╔╦╗╔╦╗┬ ┬ ╔═╗┌─┐╦ ╦╔═╗┬─┐┌┬┐");
|
||||
logger.info(" ║├┤ ║ ║ └┬┘ ╠═╝│ │║║║║╣ ├┬┘ ││");
|
||||
logger.info("╚╝└─┘ ╩ ╩ ┴ ╩ └─┘╚╩╝╚═╝┴└──┴┘");
|
||||
|
||||
connector.setPort(8080);
|
||||
server.addConnector(connector);
|
||||
|
||||
WebAppContext context = new WebAppContext();
|
||||
context.setContextPath("/");
|
||||
context.setBaseResource(buildBaseResource(getClass().getClassLoader()));
|
||||
context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", ".*/target/classes/|.*\\.jar");
|
||||
context.setConfigurations(new Configuration[]{
|
||||
new AnnotationConfiguration(),
|
||||
new WebInfConfiguration(),
|
||||
});
|
||||
server.setHandler(context);
|
||||
|
||||
JettyWebSocketServletContainerInitializer.configure(context, (servletContext, wsContainer) -> {
|
||||
wsContainer.setMaxTextMessageSize(65535);
|
||||
endpoint1 = new JettyWireServerEndpoint(wsContainer, "/con1");
|
||||
endpoint2 = new JettyWireServerEndpoint(wsContainer, "/event");
|
||||
endpoint3 = new JettyWireServerEndpoint(wsContainer, "/other");
|
||||
});
|
||||
|
||||
logger.info("Add H2 console on: /debug/jdbc/console");
|
||||
context.addServlet("org.h2.server.web.WebServlet", "/debug/jdbc/console/*");
|
||||
|
||||
context.addServlet(RedirectServlet.class, "/test");
|
||||
|
||||
// for static
|
||||
ServletHolder staticHome = new ServletHolder("staticHome", DefaultServlet.class);
|
||||
staticHome.setInitParameter("dirAllowed","false");
|
||||
context.addServlet(staticHome, "/");
|
||||
|
||||
logger.info("Add request logger console");
|
||||
CustomRequestLog log = new CustomRequestLog("logs/http.log", CustomRequestLog.EXTENDED_NCSA_FORMAT);
|
||||
server.setRequestLog(log);
|
||||
|
||||
No2AllReact react = signal.getReact();
|
||||
server.addEventListener(new Listener() {
|
||||
|
||||
@Override
|
||||
public void lifeCycleStarted(LifeCycle event) {
|
||||
// auto reply
|
||||
react.registrate(No2AllRtsServer.API, No2AllArtServer.class, artServer -> {
|
||||
No2AllReactSlot serverSlot = artServer.getData().getSlot();
|
||||
react.registrate(serverSlot, No2AllArtServerSocket.class, artSocket -> {
|
||||
No2AllReactSlot socketSlot = artSocket.getData().getSlot();
|
||||
react.registrate(socketSlot, No2AllArtServerSocketOnMessage.class, artMsg -> {
|
||||
react.fire(socketSlot,
|
||||
new No2AllActServerSocketSendMessage("RE: " + artMsg.getData().getMessage()));
|
||||
});
|
||||
});
|
||||
});
|
||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint1));
|
||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint2));
|
||||
react.fire(No2AllRtsServer.API, new No2AllActServer(endpoint3));
|
||||
}
|
||||
});
|
||||
try {
|
||||
logger.info("start");
|
||||
server.start();
|
||||
logger.info("start done");
|
||||
} catch (Exception e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void join() {
|
||||
try {
|
||||
server.join();
|
||||
} catch (InterruptedException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private Resource buildBaseResource(ClassLoader cl) {
|
||||
try {
|
||||
List<URL> paths = Collections.list(cl.getResources("META-INF/resources"));
|
||||
Resource[] resources = new Resource[paths.size() + 1];
|
||||
for (int i = 0; i < paths.size(); i++) {
|
||||
resources[i] = Resource.newResource(paths.get(i));
|
||||
}
|
||||
resources[paths.size()] = Resource.newResource("target/classes/static");
|
||||
return new ResourceCollection(resources);
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package love.distributedrebirth.no2all.zerofungus.service;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.bridge.SLF4JBridgeHandler;
|
||||
|
||||
import ch.qos.logback.core.status.NopStatusListener;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlot;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotLoad;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotSignal;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactTypeScript;
|
||||
|
||||
public class ZFunRtsConfigLogger implements No2AllReactTypeScript {
|
||||
|
||||
public static final No2AllReactSlot API = No2AllReactSlot.ofClass(ZFunRtsConfigLogger.class);
|
||||
private static final Logger logger = Logger.getLogger(ZFunRtsConfigLogger.class.getName());
|
||||
|
||||
@Override
|
||||
public void onEvent(No2AllReactSlotSignal<No2AllReactSlotLoad> signal) {
|
||||
if (System.getProperty("logback.configurationFile") != null) {
|
||||
File logConfig = null;
|
||||
if (System.getProperty("java.class.path").contains("classes")) {
|
||||
logConfig = new File("conf/logback-server-console.xml");
|
||||
} else {
|
||||
logConfig = new File("conf/logback-server.xml");
|
||||
}
|
||||
try {
|
||||
System.setProperty("logback.configurationFile", logConfig.toURI().toURL().toExternalForm());
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
System.setProperty("logback.statusListenerClass",NopStatusListener.class.getName());
|
||||
|
||||
System.setProperty("logback.configurationFile","conf/logback-server-console.xml");
|
||||
org.slf4j.Logger logger2 = LoggerFactory.getLogger("MyTest");
|
||||
logger2.debug("Hello world.");
|
||||
|
||||
SLF4JBridgeHandler.removeHandlersForRootLogger();
|
||||
SLF4JBridgeHandler.install();
|
||||
logger.info("Logging configured");
|
||||
logger.info(" ╦┌─┐╔╦╗╔╦╗┬ ┬ ╔═╗┌─┐╦ ╦╔═╗┬─┐┌┬┐");
|
||||
logger.info(" ║├┤ ║ ║ └┬┘ ╠═╝│ │║║║║╣ ├┬┘ ││");
|
||||
logger.info("╚╝└─┘ ╩ ╩ ┴ ╩ └─┘╚╩╝╚═╝┴└──┴┘");
|
||||
|
||||
//https://patorjk.com/software/taag
|
||||
// Calvin S
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package love.distributedrebirth.no2all.zerofungus.service;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.h2.jdbcx.JdbcConnectionPool;
|
||||
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlot;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotLoad;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactSlotSignal;
|
||||
import love.distributedrebirth.no2all.react.No2AllReactTypeScript;
|
||||
import love.distributedrebirth.no2all.react.warp.No2AllReactWarpCore;
|
||||
|
||||
public class ZFunRtsInitJdbc implements No2AllReactTypeScript {
|
||||
|
||||
public static final No2AllReactSlot API = No2AllReactSlot.ofClass(ZFunRtsInitJdbc.class);
|
||||
private static final Logger logger = Logger.getLogger(ZFunRtsInitJdbc.class.getName());
|
||||
private final No2AllReactWarpCore foei;
|
||||
|
||||
public ZFunRtsInitJdbc(No2AllReactWarpCore foei) {
|
||||
this.foei = foei;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(No2AllReactSlotSignal<No2AllReactSlotLoad> signal) {
|
||||
signal.getReact().claim(API);
|
||||
|
||||
JdbcConnectionPool cp = JdbcConnectionPool.create("jdbc:h2:file:./target/h2db/zfun", "sa", "sa");
|
||||
foei.addService(JdbcConnectionPool.class, cp);
|
||||
foei.addService(DataSource.class, cp);
|
||||
|
||||
Flyway flyway = Flyway.configure().schemas("ᔆʸᔆᐪᓫᔿ", "other", "ssd").table("ᣔᒃᣔᒼᓑᔆ").dataSource(cp).load();
|
||||
flyway.migrate();
|
||||
logger.info("╔╦╗┌─┐╔╦╗┌─┐╔╗ ┌─┐╔═╗┌─┐ ╔═╗┌─┐╔╦╗┬ ┬┌─┐");
|
||||
logger.info(" ║║├─┤ ║ ├─┤╠╩╗├─┤╚═╗├┤ ╚═╗├┤ ║ │ │├─┘");
|
||||
logger.info("═╩╝┴ ┴ ╩ ┴ ┴╚═╝┴ ┴╚═╝└─┘ ╚═╝└─┘ ╩ └─┘┴ ");
|
||||
try {
|
||||
startDone();
|
||||
} catch (SQLException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void startDone() throws SQLException {
|
||||
JdbcConnectionPool cp = foei.service(JdbcConnectionPool.class);
|
||||
try (Connection conn = cp.getConnection()) {
|
||||
String sql = "SELECT COUNT(\"ᑊᑊᐣ\") FROM \"ᔆʸᔆᐪᓫᔿ\".\"ᔆᐪᣔᒼᒽᑉ\"";
|
||||
PreparedStatement prep = conn.prepareStatement(sql);
|
||||
ResultSet rs = prep.executeQuery();
|
||||
if (rs.first()) {
|
||||
Long records = rs.getLong(1);
|
||||
logger.info("DB Records: " + records + " from: " + sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package love.distributedrebirth.no2all.zerofungus.web;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class RedirectServlet extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
response.sendRedirect("/powp/error/errmsg.html?title=NotHere&msg=TheEnd");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
DROP TABLE IF EXISTS "ᒄᒃᓑᔆᓫᣗ";
|
||||
CREATE TABLE IF NOT EXISTS "ᒄᒃᓑᔆᓫᣗ" (
|
||||
"ᑊᑊᐣ" BIGINT NOT NULL AUTO_INCREMENT,
|
||||
"ᣕᣔᔿᓫ" VARCHAR(100) NOT NULL,
|
||||
"ᓑᔆᓫᣗᣕᣔᔿᓫ" VARCHAR(45) NOT NULL,
|
||||
"ᣖᣔᔆᔆᒡᒢᐤᣗᒄ" VARCHAR(256) NOT NULL,
|
||||
"ᓫᔿᣔᑊᒻ" VARCHAR(200) NOT NULL,
|
||||
"ᔆᐪᣔᐪᓑᔆ" VARCHAR(45) NOT NULL,
|
||||
delete_reason VARCHAR(500) NULL,
|
||||
create_dt DATETIME NOT NULL DEFAULT now(),
|
||||
create_uid BIGINT NOT NULL DEFAULT 1,
|
||||
modify_dt DATE NULL,
|
||||
modify_uid BIGINT NULL,
|
||||
PRIMARY KEY ("ᑊᑊᐣ"))
|
||||
;
|
||||
|
||||
CREATE UNIQUE INDEX "ᒄᒃᓑᔆᓫᣗᐨᓑᑊᐣᕁᐨᓑᔆᓫᣗᣕᣔᔿᓫ" ON "ᒄᒃᓑᔆᓫᣗ" ("ᓑᔆᓫᣗᣕᣔᔿᓫ" ASC);
|
||||
CREATE INDEX "ᒄᒃᓑᔆᓫᣗᐨᑊᑊᐣᕁᐨᔆᐪᣔᐪᓑᔆ" ON "ᒄᒃᓑᔆᓫᣗ" ("ᔆᐪᣔᐪᓑᔆ" ASC);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "ᔆᐪᣔᒼᒽᑉ" (
|
||||
"ᑊᑊᐣ" text NOT NULL,
|
||||
"ᣖᓑᒃᒽᑉᓫᔾ" TEXT NOT NULL,
|
||||
"ᒼᣗᓫᣔᐪᓫᐝᒄᐪ" DATETIME NOT NULL DEFAULT now(),
|
||||
"ᑊᑉᑊᣕᒄ" INTEGER NOT NULL,
|
||||
"ᒄᓫᒻᐪᣔᕐ" TEXT NULL,
|
||||
"ᓫᕁᣖᑊᣗᓫᐝᒄᐪ" DATETIME NULL,
|
||||
"ᣗᣔᒡᒢ" JSON NOT NULL,
|
||||
PRIMARY KEY ("ᑊᑊᐣ"))
|
||||
;
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "ᔆᐪᣔᒼᒽᑉᐨᓑᑊᐣᕁᐨᑊᑊᐣ" ON "ᔆᐪᣔᒼᒽᑉ" USING btree ("ᑊᑊᐣ");
|
||||
CREATE INDEX IF NOT EXISTS "ᔆᐪᣔᒼᒽᑉᐨᑊᑊᐣᕁᐨᣖᓑᒃᒽᑉᓫᔾ" ON "ᔆᐪᣔᒼᒽᑉ" USING btree ("ᣖᓑᒃᒽᑉᓫᔾ");
|
||||
CREATE INDEX IF NOT EXISTS "ᔆᐪᣔᒼᒽᑉᐨᑊᑊᐣᕁᐨᒼᣗᓫᣔᐪᓫᐝᒄᐪ" ON "ᔆᐪᣔᒼᒽᑉ" ("ᒼᣗᓫᣔᐪᓫᐝᒄᐪ" DESC);
|
||||
CREATE INDEX IF NOT EXISTS "ᔆᐪᣔᒼᒽᑉᐨᑊᑊᐣᕁᐨᑊᑉᑊᣕᒄ" ON "ᔆᐪᣔᒼᒽᑉ" ("ᑊᑉᑊᣕᒄ");
|
||||
CREATE INDEX IF NOT EXISTS "ᔆᐪᣔᒼᒽᑉᐨᑊᑊᐣᕁᐨᓫᕁᣖᑊᣗᓫᐝᒄᐪ" ON "ᔆᐪᣔᒼᒽᑉ" ("ᓫᕁᣖᑊᣗᓫᐝᒄᐪ" DESC);
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
INSERT INTO "ᒄᒃᓑᔆᓫᣗ" ("ᑊᑊᐣ", "ᣕᣔᔿᓫ", "ᓑᔆᓫᣗᣕᣔᔿᓫ", "ᣖᣔᔆᔆᒡᒢᐤᣗᒄ", "ᓫᔿᣔᑊᒻ", "ᔆᐪᣔᐪᓑᔆ") VALUES (1, 'Technical User', 'tech', '00000000', 'technical@', 'TECHNICAL');
|
||||
INSERT INTO "ᒄᒃᓑᔆᓫᣗ" ("ᑊᑊᐣ", "ᣕᣔᔿᓫ", "ᓑᔆᓫᣗᣕᣔᔿᓫ", "ᣖᣔᔆᔆᒡᒢᐤᣗᒄ", "ᓫᔿᣔᑊᒻ", "ᔆᐪᣔᐪᓑᔆ") VALUES (2, 'Admin', 'admin', '000000000', 'admin@', 'ACTIVE');
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", "Helvetica", "Arial";
|
||||
font-size: 14px;
|
||||
background-color: rgba(45, 67, 49, 0.32);
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 500px;
|
||||
margin: 25px auto;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
padding: 20px;
|
||||
background-color: #233927;
|
||||
color: #fff;
|
||||
-moz-border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
form .dialog, #errorTitle {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Error</title>
|
||||
<meta name="keywords" content="error">
|
||||
<meta name="description" content="Error">
|
||||
<script src="../../webjars/jquery/3.5.1/jquery.slim.min.js"></script>
|
||||
<link rel="stylesheet" href="errmsg.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="dialog">
|
||||
<h2 id="errorTitle">Error</h2>
|
||||
<p><br></p>
|
||||
<p>We could not process your request because;</p>
|
||||
<p id="errorMessage">...</p>
|
||||
<a href="/">Home</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
"use strict";
|
||||
(function($) {
|
||||
var searchParams = new URLSearchParams(window.location.search);
|
||||
if (searchParams.has('msg')) {
|
||||
$('#errorMessage').html(searchParams.get('msg').replace(/_/g, ' '));
|
||||
}
|
||||
if (searchParams.has('title')) {
|
||||
var title = searchParams.get('title').replace(/_/g, ' ');
|
||||
$('#errorTitle').html('Error || ' + title);
|
||||
window.document.title = 'Error || ' + title;
|
||||
}
|
||||
})(jQuery);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue