819000 Technical Notes

website·Indexed 29 days ago

https://notes.819000.xyz

A collection of technical notes and tutorials covering Java, Spring Security, Spring Cloud Alibaba (Sentinel), MySQL 8, Redis, RabbitMQ, and Linux/CentOS administration. Includes guides on IntelliJ IDEA configuration, Git .gitignore templates, CSS Flexbox, and VuePress Markdown stylization.

Tokens
113.5K
Snippets
595
Records
780
Agent score
50%

What's inside 819000 Notes

  1. Overview of MyBatis-Plus features

    MyBatis-Plus (MP) is an enhancement tool for MyBatis designed to simplify development and increase efficiency. It follows a non-invasive approach, meaning it adds functionality without changing the existing MyBatis core, ensuring compatibility with existing projects. Key features include:

    • Automatic CRUD: Automatically injects basic Create, Read, Update, and Delete operations upon startup with minimal performance overhead.
    • Lambda Support: Allows the use of Lambda expressions for writing query conditions to prevent field naming errors.
    • Primary Key Generation: Supports four different primary key strategies, including a distributed unique ID generator (Sequence).
    • ActiveRecord Pattern: Entities can inherit from the Model class to perform CRUD operations directly on the object.
    • Code Generation: Includes a built-in generator (via code or Maven plugin) to quickly create Mapper, Model, Service, and Controller layers using template engines.
    • Pagination: Provides a physical pagination plugin supporting multiple databases (MySQL, MariaDB, Oracle, DB2, H2, HSQL, SQLite, PostgreSQL, SQL Server).
    • Performance Analysis: Includes a plugin to output SQL statements and their execution time to identify slow queries.
    • Global Interceptor: Provides intelligent analysis and blocking for dangerous operations like full-table deletes or updates to prevent accidental data loss.
  2. Overview of Vue.js features and architecture

    Vue is a progressive JavaScript framework used for building dynamic user interfaces. It is designed to be adopted incrementally, starting with a lightweight core library for simple apps and adding plugins for complex ones. Key technical characteristics include:

    • Follows the MVVM pattern.
    • Uses a component-based architecture for high code reuse and maintainability.
    • Employs declarative rendering, removing the need for direct DOM manipulation.
    • Utilizes a Virtual DOM and Diff algorithm to optimize DOM updates.
    • Combines template and data-binding techniques (inspired by Angular) with componentization and Virtual DOM (inspired by React).
  3. Overview of MyBatis features and capabilities

    MyBatis is a semi-automatic Object Relational Mapping (ORM) framework that provides a persistence layer for Java applications. Key features include:

    • Support for customized SQL, stored procedures, and advanced mapping.
    • Elimination of most boilerplate JDBC code, such as manual parameter setting and result set retrieval.
    • Use of simple XML or annotations for configuration and raw mapping, allowing Java POJOs (Plain Old Java Objects) to be mapped to database records.
  4. Overview of Spring Cloud Alibaba

    Spring Cloud Alibaba is a one-stop solution for microservices development, designed to help developers build distributed applications using the Spring Cloud programming model. It allows developers to integrate Alibaba's microservices solutions into Spring Cloud applications with minimal configuration and annotations, leveraging Alibaba's proven middleware for high performance and stability.
  5. Overview of Jenkins features and capabilities

    Jenkins is an open-source Continuous Integration (CI) tool developed in Java. It automates the building, testing, and deployment phases of software development to monitor repetitive tasks and enable a continuous integration pipeline. Key features include:

    • Easy Deployment: Supports installation via yum, WAR packages, or Docker containers, with management via a web interface.
    • Notifications & Reporting: Integrates with RSS and Email for build results and generates JUnit/TestNG test reports.
    • Distributed Builds: Allows multiple computers to participate in the build and test process.
    • Artifact Tracking: Tracks which build produced specific JAR files and which versions were used.
    • Extensibility: Supports a wide range of plugins for tools like Git, SVN, Maven, and Docker.
  6. Overview of MyBatis-Plus Wrapper Hierarchy

    MyBatis-Plus uses a hierarchy of Wrapper classes to encapsulate SQL WHERE conditions.

    • Wrapper: The top-level abstract base class.
    • AbstractWrapper: The base for generating SQL WHERE conditions. It provides common methods like eq, ne, gt, ge, lt, le, between, like, isNull, in, groupBy, orderBy, etc.
    • QueryWrapper: Used for query conditions (can also be used for updates). Adds the select method to specify return columns.
    • UpdateWrapper: Specialized for update operations. Adds set and setSql methods to modify specific columns.
    • LambdaQueryWrapper & LambdaUpdateWrapper: Provide Lambda expression syntax to reference entity getters (e.g., User::getName), preventing errors caused by hardcoded column names.
  7. Overview of Alibaba Sentinel features and architecture

    Sentinel is a flow control component designed to protect service stability through traffic control, circuit breaking, degradation, and system load protection.

    Key features include:

    • Real-time Monitoring: Provides second-level data for single machines and aggregated views for clusters (up to 500 nodes).
    • Ecosystem Integration: Out-of-the-box support for Spring Cloud, Apache Dubbo, gRPC, and Quarkus, with native implementations in Java, Go, and C++.
    • SPI Extension: Allows customization of logic such as rule management and dynamic data sources.

    Architecture consists of two main parts:

    1. Core Library (Java Client): A framework-agnostic library that runs in any Java environment and supports Dubbo/Spring Cloud.
    2. Dashboard: A Spring Boot-based management console that can be run as a standalone JAR without an external container.
  8. Overview of Docker and its Core Concepts

    Docker is an open-source application container engine written in Go and licensed under Apache 2.0. It allows developers to package applications and their dependencies into lightweight, portable containers that can be deployed on any popular Linux machine. Unlike traditional virtualization, Docker uses a sandbox mechanism to isolate containers, ensuring they have no direct interfaces with each other while maintaining extremely low performance overhead.

    Docker is available in two primary editions:

    • CE (Community Edition): The free community version.
    • EE (Enterprise Edition): The commercial enterprise version.
  9. Overview of MyBatis Reverse Engineering

    Reverse engineering in MyBatis is the process of automatically generating Java resources based on existing database tables. The MyBatis Generator (MBG) produces the following components:

    • Java Entity classes (POJOs)
    • Mapper interfaces
    • Mapper XML mapping files
  10. Overview of Spring Security

    Spring Security is a powerful and highly customizable authentication and access control framework designed for Java applications. It provides a comprehensive solution for identity verification and authorization. While historically competing with Apache Shiro, Spring Security has become the preferred choice for microservices due to its seamless integration with Spring Boot and Spring Cloud, as well as its robust support for OAuth2.
  11. Overview of common Vue.js built-in directives

    Vue provides several built-in directives for common tasks:

    • v-bind: One-way data binding for attributes (shorthand: :xxx).
    • v-model: Two-way data binding.
    • v-for: Iterates over arrays, objects, or strings.
    • v-on: Binds event listeners (shorthand: @).
    • v-if / v-else: Conditional rendering that dynamically adds or removes elements from the DOM.
    • v-show: Conditional rendering that toggles the visibility of an element via CSS.
  12. Understand Vue Data Proxying mechanism

    Vue uses data proxying to allow developers to read and write properties of the data object directly on the Vue instance (vm). This eliminates the need to reference this.data.property and allows for this.property instead.

    Core Principles:

    1. Vue uses Object.defineProperty() to add all properties from the data object onto the vm instance.
    2. For every property added to vm, a corresponding getter and setter are defined.
    3. The getter and setter internally perform the read/write operations on the original property within the data object.