51 lines
1.7 KiB
Java
51 lines
1.7 KiB
Java
package cn.cloudowr.attach;
|
|
|
|
import com.jfinal.core.JFinal;
|
|
|
|
import java.util.Properties;
|
|
|
|
/**
|
|
* Created by lyf66 on 2017/2/16.
|
|
*/
|
|
public class Main {
|
|
public static String username;
|
|
public static String database;
|
|
public static String password;
|
|
public static String host;
|
|
public static int port;
|
|
public static String dabaseName;
|
|
public static String endpoint ;
|
|
public static String accessKeyId ;
|
|
public static String accessKeySecret ;
|
|
public static String BukketName ;
|
|
public static String OssUrl ;
|
|
private static int AppPort;
|
|
|
|
public static void main(String[] args) {
|
|
read();
|
|
JFinal.start("src/main/webapp", AppPort, "/");
|
|
}
|
|
|
|
private static void read(){
|
|
try{
|
|
Properties pro = new Properties();
|
|
pro.load(Config.class.getResourceAsStream("/config.properties"));
|
|
username = pro.getProperty("username");
|
|
database = pro.getProperty("database");
|
|
password = pro.getProperty("password");
|
|
host = pro.getProperty("host");
|
|
port = Integer.parseInt(pro.getProperty("port"));
|
|
dabaseName = pro.getProperty("dabaseName");
|
|
endpoint = pro.getProperty("endpoint");
|
|
accessKeyId = pro.getProperty("accessKeyId");
|
|
accessKeySecret = pro.getProperty("accessKeySecret");
|
|
BukketName = pro.getProperty("BukketName");
|
|
OssUrl = pro.getProperty("OssUrl");
|
|
AppPort = Integer.parseInt(pro.getProperty("AppPort"));
|
|
}catch ( Exception e ){
|
|
e.printStackTrace();
|
|
System.exit(0);
|
|
}
|
|
}
|
|
}
|