|
@ -31,6 +31,7 @@ import java.util.Set;
|
|
|
@EntityScan("com.yihu.hos.**.model")
|
|
|
public class App {
|
|
|
private static Properties prop = new Properties();
|
|
|
|
|
|
//@RequestMapping("/")
|
|
|
//String home() {
|
|
|
// return "Hello World!";
|
|
@ -62,14 +63,16 @@ public class App {
|
|
|
|
|
|
//SpringApplication.run(App.class, args);
|
|
|
//启动RPC服务器
|
|
|
Server server = Server.getInstance(8891);
|
|
|
server.start();
|
|
|
|
|
|
initConfig();
|
|
|
readpop();
|
|
|
|
|
|
|
|
|
Server server = Server.getInstance(Integer.valueOf(Config.port));
|
|
|
server.start();
|
|
|
}
|
|
|
|
|
|
private static void initConfig() {
|
|
|
private static void initConfig() {
|
|
|
try {
|
|
|
InputStream in = App.class.getResourceAsStream("/config/dbhelper.properties");
|
|
|
prop.load(in);
|
|
@ -78,9 +81,11 @@ public class App {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
private static void readpop(){
|
|
|
Config.url= prop.getProperty("rpc.url");
|
|
|
|
|
|
private static void readpop() {
|
|
|
Config.url = prop.getProperty("rpc.url");
|
|
|
Config.appId = prop.getProperty("rpc.appId");
|
|
|
Config.port = prop.getProperty("rpc.port");
|
|
|
Config.monogoUrl = prop.getProperty("http.monogourl");
|
|
|
Config.startCollect = prop.getProperty("http.startCollect");
|
|
|
}
|