Jhipster : Create Spring Boot + Angular/React applications

ghz 10months ago ⋅ 231 views

JHipster is a development platform that generates a full-stack application using Spring Boot on the backend and Angular or React on the frontend. It provides a powerful and extensible set of tools to kickstart your project development. Here's a basic guide on how to create a Spring Boot + Angular/React application using JHipster:

  1. Install JHipster:

    First, you need to have Node.js, npm (Node Package Manager), and Java Development Kit (JDK) installed on your system. Then, you can install JHipster globally using npm:

    npm install -g generator-jhipster
    
  2. Generate Your Application:

    Once JHipster is installed, you can generate your application by running the following command:

    jhipster
    

    This command will prompt you with a series of questions to configure your application, including options for authentication, database configuration, frontend framework (Angular or React), and more. Choose the appropriate options based on your project requirements.

  3. Follow the Generator Prompts:

    Answer the prompts according to your project needs. You can choose options such as database type (MySQL, PostgreSQL, etc.), authentication type (JWT, OAuth2, etc.), and frontend framework (Angular, React, or Vue.js).

  4. Run Your Application:

    After generating your application, navigate to the generated directory and run the following command to start your application:

    ./mvnw (or mvnw.cmd on Windows) # For backend (Spring Boot)
    

    For the frontend (Angular or React), you need to navigate to the src/main/webapp directory (for Angular) or src/main/webapp/app directory (for React) and run:

    npm start
    

    This command will start the development server for the frontend application.

  5. Access Your Application:

    Once your application is running, you can access it in your web browser by navigating to http://localhost:8080 for the backend and http://localhost:9000 (Angular) or http://localhost:8081 (React) for the frontend.

  6. Explore and Customize:

    JHipster generates a full-fledged application with user authentication, entity management, and more. You can explore the generated code and customize it to fit your project requirements. Additionally, you can use JHipster's built-in tools and commands to generate entities, services, and other components.

By following these steps, you can quickly create a Spring Boot + Angular/React application using JHipster and start building your project.