richie
5 years ago
2 changed files with 44 additions and 0 deletions
@ -0,0 +1,6 @@
|
||||
*.iml |
||||
.idea/ |
||||
/target/ |
||||
/download/ |
||||
/webroot/ |
||||
.DS_Store |
@ -0,0 +1,38 @@
|
||||
package com.finebi.start; |
||||
|
||||
import com.fr.stable.ProductConstants; |
||||
import com.fr.startup.FineWebApplicationInitializer; |
||||
import com.fr.third.springframework.web.SpringServletContainerInitializer; |
||||
import org.apache.catalina.Context; |
||||
import org.apache.catalina.startup.Tomcat; |
||||
|
||||
import java.util.HashSet; |
||||
import java.util.Set; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @version 10.0 |
||||
* Created by richie on 2019/10/18 |
||||
* FineBI启动器 |
||||
*/ |
||||
public class Leaner { |
||||
|
||||
private static final String APP_NAME = "webroot"; |
||||
|
||||
public static void main(String... args) throws Exception { |
||||
|
||||
Tomcat tomcat = new Tomcat(); |
||||
tomcat.setPort(8080); |
||||
|
||||
String docBase = System.getProperty("user.dir") + "/" + APP_NAME; |
||||
ProductConstants.setWebAppName(ProductConstants.getAppFolderName()); |
||||
String appName = "/" + APP_NAME; |
||||
Context context = tomcat.addContext(appName, docBase); |
||||
|
||||
SpringServletContainerInitializer initializer = new SpringServletContainerInitializer(); |
||||
Set<Class<?>> classes = new HashSet<>(); |
||||
classes.add(FineWebApplicationInitializer.class); |
||||
context.addServletContainerInitializer(initializer, classes); |
||||
tomcat.start(); |
||||
} |
||||
} |
Loading…
Reference in new issue