Coder Social home page Coder Social logo

laongdaoxing / thymeleaf_charts_websocket_jpa Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 651 KB

websocket+线程轮询:后台使用线程定时查询数据库变动数据,若有变动将用websocket实时推送消息到前台页面显示

License: Mozilla Public License 2.0

Java 59.94% HTML 40.06%

thymeleaf_charts_websocket_jpa's Introduction

thymeleaf_charts_websocket_jpa

websocket+线程轮询:后台使用线程定时查询数据库变动数据,若有变动将用websocket实时推送消息到前台页面显示

一、svn地址

 https://
 账号
 密码

二、本地项目

1、使用软件

 IntelliJ IDEA 2019.3 x64

2、配置

(1)环境

 jdk1.8
 tomcat85_8090

(2)导入jar包

 项目 右键》Maven》Update Project...(Alt+F5)

(3)配置文件application.properties

  • spring.datasource.url=修改数据库信息,ip、数据库名;
  • server.port=IDEA启动项目/浏览器访问项目地址中的端口号8090

(4)配置文件application-dev.properties

  • server.servlet.context-path=/启动项目名称

3、启动

 SpringBoot项目的主配置文件ChartApplication.java》点击按钮Debug

4、注意

 SpringBoot项目在启动后,首先会去静态资源路径(resources/static/)下查找 index.html 作为首页文件。
 如果在静态资源路径(resources/static/)下找不到 index.html,则会到(resources/templates/)目录下找 index.html(使用 Thymeleaf 模版)作为首页文件。

5、启动后浏览器默认访问地址

http://localhost:8090/thymeleaf_charts_websocket_jpa/

6、演示图

三、项目部署linux服务器

1、项目打包

2、linux服务器地址

 192.168.21.120
 root
 123456

3、部署位置:

 /opt/developsoft/servers/tomcat/tomcat85_8090

4、部署注意:

(1)ps -ef | grep thymeleaf_charts_websocket_jpa.jar查出进程号,kill -9 进程号;
(2)替换jar;
(3)./startup.sh 启动

5、启动后浏览器默认访问地址

http://192.168.21.120:8090/thymeleaf_charts_websocket_jpa

四、jenkins自动部署

1、浏览器地址

 http://
 账号
 密码

2、启动

3、启动后浏览器默认访问地址

thymeleaf_charts_websocket_jpa's People

Contributors

laongdaoxing avatar

Stargazers

 avatar

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.