Java backend frameworks and common dependencies

Published 2026-07-27 09:43 Updated 2026-08-02 00:00 771 words 4 min read ... Page views

This article outlines the frameworks and technology stacks commonly used in Java backend development, focusing on Spring Boot as the core framework and combined with Maven for project configuration. Standardized configuration of database access and data operations is achieved by configuring the MySQL database, Druid connection pool, and MyBatis-Plus persistence layer framework in the src/main/resources/application.yml file.

Java backend frameworks and common dependencies

Overview of technology stack

Technical FieldRelated TechnologyMain Role
Java Basic EnvironmentJava 17provides a compilation and execution environment for Java backend programs
core development frameworkSpring Frameworkprovides basic capabilities such as IoC, DI, AOP, and transaction management
Application Development FrameworkSpring Bootsimplifies the configuration, dependency management, launch and deployment of Spring applications
Web DevelopmentSpring MVCis responsible for HTTP request processing, parameter binding, controller calls and response data return
Data persistenceMyBatisis responsible for mapping between Java objects and SQL statements
Persistence Layer EnhancementsMyBatis-Plusprovides functions such as universal CRUD, condition builder and paging based on MyBatis
Relational DatabaseMySQLfor storing and managing business data
Database connection poolDruidmanages database connections and provides functions such as connection pool monitoring and SQL statistics
Security CertificationSpring Securityimplements user authentication, rights control and request security management
Identity TokensJWT, JJWTImplement token-based stateless identity authentication
Interface DocumentationOpenAPI, Knife4jautomatically generate interface documentation, and provide interface viewing and online debugging functions
JSON processingJacksoncompletes the conversion between Java objects and JSON data
Log ManagementSLF4J, Logback, Log4j 2Records program running status, debugging information and exception information
Code SimplificationLombokReduce duplicate codes such as Getter, Setter, and construction methods through annotations
interface designRESTfuluses HTTP methods and resource path specifications to design backend interface
project buildsMavenmanages project dependencies and completes construction tasks such as compilation, testing, and packaging
Development AssistantSpring Boot DevToolsprovides development stage assistance functions such as automatic restart
Test SupportSpring Boot Testprovides relevant components required for unit and integration testing

Spring Boot project

Maven project configuration

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.3.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.hyxy</groupId>
    <artifactId>springboot-demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>springboot-demo</name>
    <description>springboot-demo</description>
    <url/>
    <licenses>
        <license/>
    </licenses>
    <developers>
        <developer/>
    </developers>
    <scm>
        <connection/>
        <developerConnection/>
        <tag/>
        <url/>
    </scm>
    <properties>
        <java.version>17</java.version>
    </properties>
    <dependencies>
        <!-- Spring MVC、REST Controller、内置 Tomcat -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>


        <!-- 配置提示 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- 热部署 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <!-- SpringBoot3 适配核心依赖 -->
        <!-- MyBatisPlus 适配SpringBoot3 专属依赖 -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
            <version>3.5.6</version>
        </dependency>
        <!-- MySQL 驱动 -->
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-3-starter</artifactId>
            <version>1.2.23</version>
        </dependency>
        <!-- lombok 简化实体类 -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- SpringBoot3 测试依赖 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
            <version>4.4.0</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>0.12.5</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>0.12.5</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>0.12.5</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

database configuration

Configure MySQL, Druid and MyBatis-Plus in src/main/resources/application.yml.

spring:
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      url: jdbc:mysql://localhost:33066/java2601?serverTimezone=UTC&characterEncoding=utf8
      username: root
      password: 123456
      driver-class-name: com.mysql.cj.jdbc.Driver
      max-active: 10
      min-idle: 3
      initial-size: 2
      max-wait: 10000
mybatis-plus:
  # xml映射文件的位置
  mapper-locations: classpath*:/mapper/**/*.xml
  # 实体类别名 包
  type-aliases-package: com.hyxy.mp.entity
  configuration:
    # 开启下划线转驼峰自动映射
    map-underscore-to-camel-case: true
    # 开启SQL日志打印
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      # 主键自增策略
      id-type: auto
      # 数据库表前缀(可选)
      # table-pre x: tb_
      # 逻辑删除全局配置
#      logic-delete-field: deleteFlag
#      logic-delete-value: 1 # 已删除
#      logic-not-delete-value: 0 # 未删除
# Knife4j 核心配置(SpringBoot3 通用)
knife4j:
  # 开启增强模式(解锁全部高级功能,必开)
  enable: true
  # 生产环境开关(true=生产关闭文档,false=开发开启)
  production: false
  # UI个性化配置
  setting:
  # 开启暗黑模式
  enable-dark-mode: true
  # 开启接口搜索
  enable-search: true
  # 显示参数长度
  enable-param-length: true
  # 开启接口显示排序
  enable-api-sort: true

jwt:
  secret: l06rIAxOHwGDnjGUvN5XhVIyW4PGQzy4Eff+GFwZTA=
  expire-ms: 3600000

If you enjoyed this, leave a comment~

... Page views
© 2026 跨越星轨的客 @Hoshiumi
Powered by theme astro-koharu · Inspired by Shoka