All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.n2oapp.framework.ui.servlet.RestartServlet Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
package net.n2oapp.framework.ui.servlet;

import net.n2oapp.framework.config.ConfigStarter;
import net.n2oapp.framework.mvc.n2o.N2oServlet;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

import static net.n2oapp.context.StaticSpringContext.getBean;

/**
 * Сервлет рестарта метаданных
 */
@WebServlet("/restart")
public class RestartServlet extends N2oServlet {

    @Override
    protected void safeDoGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        getBean(ConfigStarter.class).restart();
        response.sendRedirect("");//после успешного рестарта отправляем на home page
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy