Convert Figma logo to code with AI

eugenp logotutorials

Just Announced - "Learn Spring Security OAuth":

36,477
54,466
36,477
91

Top Related Projects

Design patterns implemented in Java

58,536

All Algorithms implemented in Java

Everything you need to know to get the job.

145,827

「Java学习+面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,首选 JavaGuide!

174,630

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

Spring Boot

Quick Overview

The "tutorials" repository on GitHub, owned by Eugen Paraschiv, is a collection of small and focused tutorials on various Java-related topics. It serves as a comprehensive resource for developers looking to expand their knowledge and skills in the Java ecosystem.

Pros

  • Extensive Coverage: The repository covers a wide range of Java-related topics, including Spring, Hibernate, Java 8, 9, 10, 11, and 12, Maven, Mockito, and more.
  • Practical Examples: The tutorials provide hands-on examples and code snippets that help developers understand the concepts better.
  • Active Maintenance: The repository is actively maintained, with regular updates and new content added.
  • Community Involvement: The project has a large and engaged community, with contributors from around the world.

Cons

  • Overwhelming Scope: The sheer number of topics covered can be overwhelming for beginners, making it difficult to navigate the repository.
  • Inconsistent Quality: The quality of the tutorials can vary, as they are contributed by different authors.
  • Outdated Content: Some of the tutorials may contain outdated information or code examples, as the Java ecosystem is constantly evolving.
  • Lack of Structured Learning Path: The repository lacks a clear, structured learning path, which can make it challenging for newcomers to follow a logical progression.

Code Examples

Since this repository is not a code library, but rather a collection of tutorials, there are no specific code examples to provide. However, the tutorials themselves contain numerous code snippets and examples that demonstrate the concepts being covered.

Getting Started

As this is not a code library, there are no specific getting started instructions to provide. However, users can navigate to the repository's README.md file to get an overview of the available tutorials and resources, and then explore the individual tutorial directories to find the content that best suits their learning needs.

Competitor Comparisons

Design patterns implemented in Java

Pros of java-design-patterns

  • Focused specifically on design patterns, providing in-depth explanations and implementations
  • Includes a wide variety of design patterns, including lesser-known ones
  • Well-organized with clear categorization of patterns

Cons of java-design-patterns

  • Limited to design patterns, lacking coverage of other Java topics
  • May be overwhelming for beginners due to its comprehensive nature
  • Updates less frequently than tutorials

Code Comparison

java-design-patterns (Singleton pattern):

public final class Singleton {
    private static final Singleton INSTANCE = new Singleton();
    private Singleton() {}
    public static Singleton getInstance() {
        return INSTANCE;
    }
}

tutorials (Singleton pattern):

public class Singleton {
    private static Singleton instance;
    private Singleton() {}
    public static synchronized Singleton getInstance() {
        if (instance == null) {
            instance = new Singleton();
        }
        return instance;
    }
}

The java-design-patterns example uses eager initialization, while the tutorials example uses lazy initialization with synchronization. This showcases different approaches to implementing the same pattern, with java-design-patterns focusing on simplicity and tutorials demonstrating thread-safety considerations.

58,536

All Algorithms implemented in Java

Pros of Java

  • Focused specifically on algorithms and data structures
  • Clear organization by algorithm type (e.g., sorting, searching)
  • Includes implementations in multiple programming languages

Cons of Java

  • Less comprehensive coverage of Java ecosystem and frameworks
  • Fewer practical, real-world application examples
  • Limited explanations and documentation for each algorithm

Code Comparison

Java (Bubble Sort implementation):

static void bubbleSort(int[] arr) {
    int n = arr.length;
    for (int i = 0; i < n-1; i++)
        for (int j = 0; j < n-i-1; j++)
            if (arr[j] > arr[j+1]) {
                int temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
            }
}

tutorials (Spring Boot REST API example):

@RestController
@RequestMapping("/api")
public class UserController {
    @GetMapping("/users")
    public List<User> getAllUsers() {
        // Implementation
    }
}

The Java repository focuses on algorithm implementations, while tutorials covers a broader range of Java topics and frameworks. Java provides concise, standalone algorithm examples, whereas tutorials offers more complex, application-oriented code samples.

Everything you need to know to get the job.

Pros of interviews

  • Focused specifically on coding interview preparation
  • Includes solutions to common algorithmic problems
  • More concise and targeted content for job seekers

Cons of interviews

  • Less comprehensive coverage of general programming topics
  • Fewer practical, real-world application examples
  • Limited to mainly Java implementations

Code Comparison

interviews:

public ListNode reverseList(ListNode head) {
    ListNode prev = null;
    while (head != null) {
        ListNode next = head.next;
        head.next = prev;
        prev = head;
        head = next;
    }
    return prev;
}

tutorials:

@GetMapping("/api/employees")
public List<Employee> getAllEmployees() {
    return employeeRepository.findAll();
}

The interviews repository focuses on algorithmic solutions like reversing a linked list, while tutorials provides more practical examples such as creating REST API endpoints.

tutorials offers a broader range of topics and technologies, making it suitable for general learning and skill development. interviews is more specialized, concentrating on coding challenges typically encountered in technical interviews.

Both repositories serve different purposes: interviews helps with interview preparation, while tutorials aids in learning various programming concepts and frameworks. The choice between them depends on the user's specific goals and learning objectives.

145,827

「Java学习+面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,首选 JavaGuide!

Pros of JavaGuide

  • Comprehensive coverage of Java ecosystem, including frameworks, best practices, and interview preparation
  • Well-organized content with clear categorization and easy navigation
  • Regularly updated with community contributions and latest Java trends

Cons of JavaGuide

  • Primarily in Chinese, which may limit accessibility for non-Chinese speakers
  • Less focus on practical, hands-on coding examples compared to tutorials
  • May not cover as wide a range of technologies beyond the Java ecosystem

Code Comparison

JavaGuide example (Java 8 Stream API):

List<String> strings = Arrays.asList("abc", "", "bc", "efg", "abcd", "", "jkl");
List<String> filtered = strings.stream()
    .filter(string -> !string.isEmpty())
    .collect(Collectors.toList());

tutorials example (Java 8 Stream API):

List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);
List<Integer> squaresList = numbers.stream()
    .map(i -> i*i)
    .distinct()
    .collect(Collectors.toList());

Both repositories provide valuable resources for Java developers, with JavaGuide offering a more structured learning path and tutorials providing a wider range of practical examples across various technologies.

174,630

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

Pros of CS-Notes

  • Comprehensive coverage of computer science fundamentals
  • Well-organized content with clear categorization
  • Primarily in Chinese, catering to a specific audience

Cons of CS-Notes

  • Limited practical code examples
  • Less frequent updates compared to tutorials
  • Narrower focus on theoretical concepts

Code Comparison

CS-Notes (Algorithm example):

public int binarySearch(int[] nums, int target) {
    int left = 0, right = nums.length - 1;
    while (left <= right) {
        int mid = left + (right - left) / 2;
        if (nums[mid] == target) return mid;
        else if (nums[mid] < target) left = mid + 1;
        else right = mid - 1;
    }
    return -1;
}

tutorials (Spring Boot example):

@RestController
@RequestMapping("/api")
public class UserController {
    @Autowired
    private UserService userService;
    
    @GetMapping("/users")
    public List<User> getAllUsers() {
        return userService.findAll();
    }
}

The CS-Notes repository focuses on theoretical concepts and algorithms, while tutorials provides practical, framework-specific code examples. CS-Notes offers a broader overview of computer science topics, whereas tutorials concentrates on hands-on programming with various technologies and frameworks.

Spring Boot

Pros of Spring Boot

  • Official Spring framework repository, providing authoritative and up-to-date code
  • Comprehensive documentation and extensive community support
  • Production-ready features and auto-configuration capabilities

Cons of Spring Boot

  • Focused solely on Spring Boot, limiting coverage of other Java technologies
  • Steeper learning curve for beginners due to its comprehensive nature
  • Less diverse range of examples compared to tutorials repository

Code Comparison

Spring Boot (application.properties):

spring.datasource.url=jdbc:mysql://localhost:3306/mydb
spring.datasource.username=root
spring.datasource.password=password
spring.jpa.hibernate.ddl-auto=update

Tutorials (application.properties):

spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

The Spring Boot example uses MySQL configuration, while the Tutorials example uses H2 in-memory database, demonstrating different approaches to database setup.

Spring Boot focuses on providing a complete, production-ready framework, while Tutorials offers a wider range of examples covering various Java technologies. Spring Boot is ideal for developers building Spring-based applications, while Tutorials serves as a learning resource for multiple Java frameworks and libraries.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Cloning the repository

If you are getting an error while cloning the repository, try running: git config --global http.postBuffer 5000000

This will increase the size of the buffer from the default 1MiB to 5MiB.

To revert this value to the default, use: git config --global http.postBuffer 1000000

The Courses

"Learn Spring" Course:
>> LEARN SPRING - THE MASTER CLASS

"REST With Spring" Course:
>> THE REST WITH SPRING - MASTER CLASS

"Learn Spring Security" Course:
>> LEARN SPRING SECURITY - MASTER CLASS

Java and Spring Tutorials

This project is a collection of small and focused tutorials - each covering a single and well defined area of development in the Java ecosystem. A strong focus of these is, of course, the Spring Framework - Spring, Spring Boot and Spring Security. In addition to Spring, the modules here cover a number of aspects of Java.

Profile based segregation

We are using maven build profiles to segregate the huge list of individual projects we have in our repository.

The projects are broadly divided into 3 lists: default, default-jdk8 and default-heavy.

Next, they are segregated further on the basis of the tests that we want to execute.

Additionally, there are 2 profiles dedicated for JDK17 and above builds - which require JDK 17.

We also have a parents profile to build only parent modules.

Therefore, we have a total of 7 profiles:

ProfileIncludesType of test enabled
defaultJDK17 and above projects*UnitTest
integrationJDK17 and above projects*IntegrationTest
default-heavyHeavy/long running projects*UnitTest
integration-heavyHeavy/long running projects*IntegrationTest
default-jd8JDK8 projects*UnitTest
integration-jdk8JDK8 projects*IntegrationTest
parentsSet of parent modulesNone

Building the project

Though it should not be needed often to build the entire repository at once because we are usually concerned with a specific module.

But if we want to, we can invoke the below command from the root of the repository if we want to build the entire repository with only Unit Tests enabled:

mvn clean install -Pdefault,default-heavy

or if we want to build the entire repository with Integration Tests enabled, we can do:

mvn clean install -Pintegration,integration-heavy

Analogously, for the JDK8 projects the commands are:

mvn clean install -Pdefault-jdk8

and

mvn clean install -Pintegration-jdk8

Building a single module

To build a specific module, run the command: mvn clean install in the module directory.

It can happen that your module is part of a parent module e.g. parent-boot-1,parent-spring-5 etc, then you will need to build the parent module first so that you can build your module. We have created a parents profile that you can use to build just the parent modules, just run the profile as: mvn clean install -Pparents

Building modules from the root of the repository

To build specific modules from the root of the repository, run the command: mvn clean install --pl akka-modules,algorithms-modules -Pdefault in the root directory.

Here akka-modules and algorithms-modules are the modules that we want to build and default is the maven profile in which these modules are present.

Running a Spring Boot module

To run a Spring Boot module, run the command: mvn spring-boot:run in the module directory.

Working with the IDE

This repo contains a large number of modules. When you're working with an individual module, there's no need to import all of them (or build all of them) - you can simply import that particular module in either Eclipse or IntelliJ.

Running Tests

The command mvn clean install from within a module will run the unit tests in that module. For Spring modules this will also run the SpringContextTest if present.

To run the integration tests, use the command:

mvn clean install -Pintegration or

mvn clean install -Pintegration-heavy or

mvn clean install -Pintegration-jdk8

depending on the list where our module exists