Giter Club home page Giter Club logo

sopra-fs22-server-individual's Introduction

SoPra RESTful Service Template FS22

Getting started with Spring Boot

Setup this Template with your IDE of choice

Download your IDE of choice: (e.g., Eclipse, IntelliJ), Visual Studio Code and make sure Java 15 is installed on your system (for Windows-users, please make sure your JAVA_HOME environment variable is set to the correct version of Java).

  1. File -> Open... -> SoPra Server Template
  2. Accept to import the project as a gradle project

To build right click the build.gradle file and choose Run Build

VS Code

The following extensions will help you to run it more easily:

  • pivotal.vscode-spring-boot
  • vscjava.vscode-spring-initializr
  • vscjava.vscode-spring-boot-dashboard
  • vscjava.vscode-java-pack
  • richardwillis.vscode-gradle

Note: You'll need to build the project first with Gradle, just click on the build command in the Gradle Tasks extension. Then check the Spring Boot Dashboard extension if it already shows soprafs22 and hit the play button to start the server. If it doesn't show up, restart VS Code and check again.

Building with Gradle

You can use the local Gradle Wrapper to build the application.

  • macOS: ./gradlew
  • Linux: ./gradlew
  • Windows: ./gradlew.bat

More Information about Gradle Wrapper and Gradle.

Build

./gradlew build

Run

./gradlew bootRun

Test

./gradlew test

Development Mode

You can start the backend in development mode, this will automatically trigger a new build and reload the application once the content of a file has been changed and you save the file.

Start two terminal windows and run:

./gradlew build --continuous

and in the other one:

./gradlew bootRun

If you want to avoid running all tests with every change, use the following command instead:

./gradlew build --continuous -xtest

API Endpoint Testing

Postman

  • We highly recommend to use Postman in order to test your API Endpoints.

Debugging

If something is not working and/or you don't know what is going on. We highly recommend that you use a debugger and step through the process step-by-step.

To configure a debugger for SpringBoot's Tomcat servlet (i.e. the process you start with ./gradlew bootRun command), do the following:

  1. Open Tab: Run/Edit Configurations
  2. Add a new Remote Configuration and name it properly
  3. Start the Server in Debug mode: ./gradlew bootRun --debug-jvm
  4. Press Shift + F9 or the use Run/Debug"Name of your task"
  5. Set breakpoints in the application where you need it
  6. Step through the process one step at a time

Testing

Have a look here: https://www.baeldung.com/spring-boot-testing

sopra-fs22-server-individual's People

Contributors

jaanwilli avatar meck93 avatar nikzaugg avatar radubauzh avatar raffi07 avatar royru 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.