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

com.lab.JfStart Maven / Gradle / Ivy

There is a newer version: 2.2.3
Show newest version
package com.lab;

import com.github.youyinnn.youdbutils.YouDbManager;
import com.github.youyinnn.youdbutils.exceptions.Log4j2FilterException;
import com.jfinal.config.*;
import com.jfinal.plugin.druid.DruidStatViewHandler;
import com.jfinal.template.Engine;
import com.lab.controller.CompanyController;

/**
 * @author youyinnn
 */
public class JfStart extends JFinalConfig {

    @Override
    public void configConstant(Constants me) {
        me.setDevMode(true);
        me.setUrlParaSeparator("&");
    }

    @Override
    public void configRoute(Routes me) {
        me.add("/user", CompanyController.class, "/");
    }

    @Override
    public void configEngine(Engine me) {

    }

    @Override
    public void configPlugin(Plugins me) {

    }

    @Override
    public void configInterceptor(Interceptors me) {

    }

    @Override
    public void configHandler(Handlers me) {
        me.add(new DruidStatViewHandler("/druid"));
    }

    @Override
    public void afterJFinalStart() {
        YouDbManager.youDruid.initMySQLDataSource();
        YouDbManager.signInStatProxyFilter();
        YouDbManager.scanPackageForModel("com.lab.model");
        YouDbManager.scanPackageForService("com.lab.service");
        System.err.println("JFinal Start!");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy