Giter VIP home page Giter VIP logo

bblogs-ui's Introduction

部署步骤

1.启动nginx -->配置开机启动

vim /usr/local/nginx/conf

nginx.conf配置添加跨域

location / {
            root   /usr/local/nginx/dist;
            index  index.html index.htm;
			try_files $uri $uri/ /index.html?s=$uri&$args;
        }
		location ^~ /equipment {
            proxy_pass  http://localhost:8081;
        }

重启nginx

ps -ef | grep nginx   //查看nginx线程
kill -9 端口号(注意,要杀两个端口号)

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

2.启动redis

3.跨域控制层方法必须加 @CrossOrigin

4.部署时 vue axios前置请求换成 axios.defaults.baseURL="http://120.25.221.253:8081"

5.springboot打包jar包,无需修改启动类(部署tomcat需要)

pom指定名称

<build>
    <finalName>vueblog</finalName>
</build>

使用Maven package

jdbcURL路径

url: jdbc:mysql://localhost:3306/blog?useUnicode=true&serverTimezone=UTC

pom依赖

<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>     /*打包成jar包*/



<build>
        <finalName>vueblog</finalName>   /*jar包名*/
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>        /*添加此依赖*/
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
</build>

6.使用npm run build打包前端dist即可,可不打包成静态资源

npm run build

7.阿里云上传指令

前端vue

source /etc/profile
jps   -ml. |grep  dist |xargs. kill
nohup java -jar /usr/local/nginx/dist > nohup.log 2>&1 &

后端springboot

source /etc/profile
jps   -ml. |grep  shirodemo |xargs. kill
nohup java -jar /myprojectjar/shirodemo.jar > nohup.log 2>&1 &

8.配置一致的数据库名和表,mysql

username: user
password: ******

9.花生壳在centos自启动

10.解决部署保存数据乱码

bblogs-ui's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.