1 Star 0 Fork 22

Enock/WebJava

forked from 老馬/WebJava 
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Main.java 1.05 KB
Copy Edit Raw Blame History
老馬 authored 2013-11-21 20:48 +08:00 . 添加Main文件
import Web.*;
/**
* @author Ma
*/
public class Main {
/**
* @param args Main 方法
*/
public static void main(String[] args) {
Options.DBURL = "jdbc:mysql://localhost:3306/blog";
Options.DBDriver = "com.mysql.jdbc.Driver"; // 驱动程序名
Options.DBUser = "root";
Options.DBPassword = "123456";
Options.DEBUG = true;//开启debug模式
Options.ParseLine = true;//打印每一次请求
if (Options.DEBUG) {
//关于路径说明:在IDE环境下user.dir和jar包中的user.dir不一样,这里手动指定
Options.StaticPath = "/src/Static/";//静态文件目录
Options.TemplatePath = "/src/Template/";//模版文件目录
} else {
Options.StaticPath = "/Static/";//静态文件目录
Options.TemplatePath = "/Template/";//模版文件目录
}
HttpServer.setPATH("/", new IndexHandler());
System.out.println("Welcome Web.Java. Listen port 8080");
HttpServer.init(8080);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yuanxiaoyu/WebJava.git
git@gitee.com:yuanxiaoyu/WebJava.git
yuanxiaoyu
WebJava
WebJava
master

Search