com.lab.JfStart Maven / Gradle / Ivy
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