Fetch the repository succeeded.
This action will force synchronization from 老馬/WebJava, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
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);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。