Guide · Open source
How to use eugenp/tutorials: clone, build and run a module
Updated · written with AI from the project's own documentation and checked against our catalogue data
eugenp/tutorials is an MIT-licensed collection of small, separate Java tutorial projects, with a strong focus on Spring Boot, Spring and Spring Security. This guide shows you how to clone it, build the one module you need, run a Spring Boot module and run its tests. It is written for readers who already know some Java and Maven, as the project's README assumes that knowledge.
Quick start
- 1Clone the repository. Run git clone https://github.com/eugenp/tutorials. If you get a buffer error, raise http.postBuffer to 5000000 first.
- 2Pick a module. Browse the repository and choose the module that covers the topic you want to learn.
- 3Check the Java version. Look in the module for the JDK version it needs, since the repo supports JDK 8 through JDK 26 profiles.
- 4Build the module. Open the module directory and run mvn clean install. If it has a parent module, build the parent first.
- 5Run a Spring Boot module. From the module directory, run mvn spring-boot:run.
- 6Run the tests. Use mvn clean install for unit tests, or the matching integration profile for integration tests.
What you need before you start
The README lists three prerequisites: Git, Java and Maven. It mentions JDK 8 through JDK 26 profiles, so check the module you want for the Java version it needs.
- Git, to clone the repository
- Java (check the module for the JDK version it expects)
- Maven, to build and run modules
Clone the repository
Clone the repository with Git. If the clone fails with a buffer error, the README suggests increasing the Git buffer size from the default 1MiB to 5MiB, then reverting it afterwards if you like.
- If cloning fails with a buffer error, raise the buffer size
- To revert to the default later, set the value back to 1000000
git clone https://github.com/eugenp/tutorials
git config --global http.postBuffer 5000000
git config --global http.postBuffer 1000000Build a single module
You rarely need to build the whole repository, because most people work on one topic at a time. Open the module directory and run the build there. Some modules belong to a parent module, such as parent-boot-1 or parent-spring-5. In that case, build the parent first, using the parents profile if you want only the parent modules.
- Build one module from its own directory with mvn clean install
- If your module sits under a parent, build the parent first
- Build only the parent modules with the parents profile
mvn clean install
mvn clean install -PparentsRun a Spring Boot module
To run a Spring Boot module, go to its directory and use the Spring Boot Maven plugin goal. The README describes this as the standard way to start a module.
- Run the command from the module directory, not the repository root
mvn spring-boot:runChoose the right profile and run tests
The repository divides its projects into Maven profiles by JDK version and by heavy or long-running projects. Each profile has a default version that runs unit tests (*UnitTest) and an integration version that runs integration tests (*IntegrationTest). Running mvn clean install inside a module runs its unit tests, and for Spring modules also SpringContextTest if present. To run integration tests, use the integration profile that matches your module's list.
- default and integration: JDK 21 projects
- default-jdk17 and integration-jdk17: JDK 17 projects
- default-heavy and integration-heavy: heavy or long-running projects
- default-jdk8 and integration-jdk8: JDK 8 projects
- parents: parent modules only, with no tests
mvn clean install -Pintegration
mvn clean install -Pintegration-heavy
mvn clean install -Pintegration-jdk8Use the project in your IDE
You do not need to import the whole repository. The README says you can import just the module you are working on into Eclipse or IntelliJ. Building the whole repository from the root is also possible, using the command shown in the build section, but it is usually unnecessary.
- Import only the module you are studying
- Build multiple modules from the root with --pl and a profile when needed
mvn clean install --pl akka-modules,algorithms-modules -PdefaultWhat people use it for
- Studying one Spring Security topic by reading a single module's code
- Following along with a Spring Boot tutorial by running its module locally
- Copying a working example of one Java feature into your own project
- Running the integration tests for a Spring module to see how it is tested
Frequently asked questions
Is eugenp/tutorials free to use?
The repository is released under the MIT licence, as stated in its listing. The README also links to paid courses from Baeldung, which are separate from the code.
What do I need installed to use eugenp/tutorials?
You need Git to clone the repo, Java to compile the code, and Maven to build and run modules. The README notes that the right JDK depends on the module, so check it first.
Why does git clone fail with a buffer error?
The README says this can happen with the default buffer size. Running git config --global http.postBuffer 5000000 raises the buffer from 1MiB to 5MiB, and you can revert it with 1000000 afterwards.
Can I run the whole repository as one application?
No. The repository is a collection of separate examples, not a single product, so you build and run one module at a time.
Do I need to know Java and Maven first?
Yes. The README assumes Java and Maven knowledge, so complete beginners to programming will likely find it hard going.
What are the alternatives to eugenp/tutorials?
The listing names spring-petclinic, spring-guides and thombergs/code-examples as comparable projects. Look at them if you want a different set of Spring or Java examples.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use eugenp/tutorials if you already know Java and Maven and want a focused, runnable example of one Spring Boot, Spring or Java topic. Pick something else if you are new to programming, want a single app to deploy, or need examples outside Java.
Install options & downloads