Skip to content

基于 VUE CLI3 SSR 工程化项目,使用Spring Boot和j2v8进行服务端渲染

Notifications You must be signed in to change notification settings

jvuesource/jvue-cli3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue logo      Java logo      J2V8 logo

Java logo Maven logo Version Version Version GCC logo G++ logo J2V8 Logo License

Introduction

jvue-cli3

Next light-weight,responsive project With Vue,webpack,Vue Cli 3,Spring Boot and eclipse j2v8 Script engine for server-side-rendering

Build setup

Build Vue

cd src/main/vue && npm i -g yarn && yarn

To get started:

yarn run dev

To build & start for production:

yarn build
yarn start

To build for ssr only

yarn build:ssr

To test:

yarn test

Go back to root forder

cd ../../../../jvue

Install j2v8

linux

mvn install:install-file -Dfile=libs/j2v8_linux_x86_64-4.8.0.jar

or

mvn install:install-file -Dfile=libs/j2v8_linux_x86_64-4.8.3.jar

windows

mvn install:install-file -Dfile=libs/j2v8_win32_x86_64-4.8.3.jar -Dpackaging=jar

Run CLI

linux

mvn -f pom_linux_x86_x64.xml clean package exec:java

windows

mvn clean package exec:java

Run Spring Boot

linux

mvn -f pom_linux_x86_x64.xml clean package spring-boot:run

windows

mvn clean package spring-boot:run

Start Tomcat

# 切换到root用户
su
cd /home/soft/apache-tomcat-9.0.16/bin && ./catalina.sh run

Structure

The whole project is a Java Spring Boot Maven structure,the src/main/vue is a complete Vue Project With webpack structure

When build finish,all files merged into target/ROOT.war

Have fun and enjoy!

Contribute

You can contribute simplely by create a pull request for me

For detailed explanation on how things work, please visit author's blog.

About

基于 VUE CLI3 SSR 工程化项目,使用Spring Boot和j2v8进行服务端渲染

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%