GithubHelp home page GithubHelp logo

shankarganapathy / reactjs-springboot-maven-integration Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 27.37 MB

Integration tutorial for Spring( maven) and React JS

Java 6.95% HTML 15.23% Shell 7.75% Batchfile 4.32% CSS 7.99% JavaScript 57.76%
java reactjs maven spring-boot spring-data-jpa

reactjs-springboot-maven-integration's Introduction

ReactJs-SpringBoot-maven-Integration

Integration tutorial for Spring( maven) and React JS

1. create the react app from inside the directory of the maven project
2. do a npm install
3. create some sample html and check if i work on the tomcat server 8080 and the npm server 3000 ( the create-react-app)
4. do a npm run build   ---> you should be able to see the build folder in the react folder
5. do a maven clean package ----> you should see the react files in the target/classes/static folder.
6. add the dependencies for the "Spring boot maven plugin" & "frontend-maven-plugin" check the documentation
7. write the executions for installing node and npm & npm build also.
8. write the Configurations and mention the working directory ( where ever the package.json file is )
9. add the maven-resources-plugin  from org.apache.maven.plugin   ( this is done to copy the react files to the target/static folder bcz target is used while building the project )
10.mention phase process-resources & goal  copy-resources & mention outputDirectory target/classes/static folder path.

  11.under <resource> <directory> (mention the folder path of the build folder in the react app ) </directory> </resource>
12.run a maven clean package   -->  you should get a jar file showing up in the folder directory on the left.
13.run the project jar generated in the cmd using " java -jar jarfile_path"

Type the following for running the Project jar file from CMD

  • make sure that you are in the target folder while running this. java -jar mavenreactjsspringboot-0.0.1-SNAPSHOT.jar

reactjs-springboot-maven-integration's People

Contributors

shankarganapathy avatar

Watchers

James Cloos avatar  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.