Fading Coder

One Final Commit for the Last Sprint

Implementing Spring Security with Spring Boot and MyBatis

This guide demonstrates how to integrate Spring Security into a Spring Boot application using Gradle, MySQL, and MyBatis. We will cover the essential configurations for authentication and authorization, including password encryption and role-based access control. Database Setup First, create a datab...

Retrieving Auto-Generated Keys in MyBatis

In database operations, we often need to retrieve auto-generated primary key values after inserting records. MyBatis provides two approaches to accomplish this: using the useGeneratedKeys attribute and the selectKey element. Using useGeneratedKeys Attribute The useGeneratedKeys attribute enables aut...

Parameter Passing in MyBatis Mapper Files

MyBatis Parameter Passing: Trensferring parameters from Java code to mapper.xml files. Single Simple Parameter When a DAO interface method contains only one simple parameter (Java primitive type or String), the placeholder #{any_text} can be used, and it is independent of the method's parameter name...

Building a Minimalistic MyBatis Implementation

Introduction MyBatis serves as a persistence framework that simplifies database operations by eliminating repetitive tasks associated with traditional JDBC usage. It allows developers to focus more on business logic rather than boilerplate code, offering flexible SQL construction and result mapping...

Deep Dive: Design Patterns Within Mybatis Source Code

Understanding design patterns theoretically often differs from observing their practical application in large-scale frameworks. While there are 23 standard patterns, developers frequently encounter them more clearly within mature source codebases like Mybatis. Analyzing these internals reveals how c...

Getting Started with MyBatis: Building Your First Application

Understanding Frameworks A framework is a reusable design structure that defines the architecture of an application, outlining dependencies, responsibilities, and control flow among components. It serves as a foundation upon which developers build applications, abstracting common functionalities to...

Implementing Java Persistence with MyBatis: Core Concepts and Usage

Core Concepts of MyBatis MyBatis is a persistence framework for Java that enables custom SQL, stored procedures, and advanced object-relational mapping. Unlike full ORM tools like Hibernate, it focuses on flexible SQL control through configuration and ennotations, bridging Java objects and database...

Setting Up TkMyBatis in Spring Boot Applications

Maven Dependency Add the following dependency to your pom.xml file: <dependency> <groupId>tk.mybatis</groupId> <artifactId>mapper-spring-boot-starter</artifactId> <version>2.1.5</version> </dependency> Defining Mapper Interfaces Create mapper interface...

Chuzhou Local Products E-commerce Platform Using Spring Boot, Vue.js, and UniApp

Technology Stack Backend with Spring Boot Spring Boot simplifies application development by offering auto-configuration and embedded server support. Below is an example of a minimal REST controller implementation: import org.springframework.boot.SpringApplication; import org.springframework.boot.aut...

MyBatis Generator: Code Generation for MyBatis Applications

Introduction to MyBatis Generator MyBatis Generator (MBG), also referred to as MyBatis reverse engineering, is a specialized code generator designed for MyBatis framework users. It can rapidly generate corresponding mapping files, interfaces, and bean classes based on database tables. While it suppo...