Example project on how to develop and build React application with Java
DOWNLOAD INSTRUCTION REACET USER FILE
-
To install JAVA refer this link -> https://www.oracle.com/java/technologies/downloads
-
To install REACT with Bootstrap command -> npm install react-bootstrap bootstrap
-
To install MAVEN refer this link -> https://mkyong.com/maven/how-to-install-maven-in-windows/
-
To run React UI in local, run below commands in one terminal cd ./src/main/ui npm install npm start
-
Test UI, hit below url in browser http://localhost:4200/
-
To run Java API, execute below commands in another terminal Note: It is better to change the port number to any but not have 8080
- To change the port number, add below line in application.properties 'server.port=9080'
- mvn clean install
- java -jar target/users-0.0.1-SNAPSHOT.jar
-
Test the API, hit the below url in browser http://localhost:9080/api/users
-
To connect and validate data in H2 database
- http://localhost:8080/h2-console
- check this file for db properties -> src/main/resources/application.propesties jdbc:h2:mem:testdb username=sa password=password
- Enter the values and click connect