利用nginx代理服务器部署

1.编译vue项目,npm run build,此时会在dist目录下输出编译后的文件
2.打开nginx.conf,配置编译的vue项目目录

    location / {
        root   /opt/vue/dist; //配置打包得vue项目路径
        index  index.html index.htm;
    }

 

posted @ 2020-12-17 14:55  散落人间  阅读(123)  评论(0编辑  收藏  举报
interface food{} class A implements food{} class B implements food{} class C implements food{} public class StaticFactory { private StaticFactory(){} public static food getA(){ return new A(); } public static food getB(){ return new B(); } public static food getC(){ return new C(); } } class Client{ //客户端代码只需要将相应的参数传入即可得到对象 //用户不需要了解工厂类内部的逻辑。 public void get(String name){ food x = null ; if ( name.equals("A")) { x = StaticFactory.getA(); }else if ( name.equals("B")){ x = StaticFactory.getB(); }else { x = StaticFactory.getC(); } } }