Solving the problem of missing Jar package when Maven relies on system-level deployment scope

Question When developing the springboot project, maven introduced the local third-party jar package and it ran normally in the idea. After deploying it into a jar, it reports that the class cannot be found. The error is as follows: ERROR SpringApplication.reportFailure(834) | Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘persistenceExceptionTranslationPostProcessor’ defined in class […]

Bean scope and life cycle

Table of Contents 1.Case 2.Scope 2.1 Bean scope type 2.2 Set scope 3.Bean life cycle 3.1 Spring life cycle 3.2 Bean life cycle In Spring, Bean is the core operation. Next, let’s analyze the issue of Bean scope. 1.Case There is now a public bean (singleton mode by default) of the User class: @Component public […]

4.Bean scope and life cycle

1. Case understanding of Bean scope Suppose there is a public bean that is used by user A and user B. If user A modifies the data of the public bean when using it, unexpected logical errors will occur when user B uses it, which is equivalent to using dirty data. Reason: Because Bean is […]

@RefreshScope (nacos configuration hot update)

Source code analysis Macro process analysis 1. What spring does to beans annotated with @RefreshScopre 1. When calling the get method of the attribute of the bean annotated with @RefreshScope, it is first obtained from the local cache. 2. When the current bean does not exist in the local cache, it will be re-created. At […]

The scope and life cycle of variables in functions and their search order

Scope and life cycle of variables in functions Global Scope Local Scope Enclosing Scope Built-in Scope Scope summary Global Variables global keyword declaration Local Variables Nonlocal Variables Built-in Variables Search order of variables (LEGB) Scope specifies the accessible scope and life cycle of a variable Lifecycle: The lifecycle of a variable depends on the scope […]

The life cycle and scope of Go language variables

Table of Contents Lifecycle and scope Scope of short variable declaration statement variable scope global scope function scope block scope Nesting of scopes Scope of a variable with the same name code example Summarize For more related technical points about Go, please pay attention to the public account: CTO Plus for subsequent posts. If you […]

Python namespaces and scopes

1. Please explain what is namespace in Python? 1. Explanation: Namespace is a concept in Python used to store variable names and objects. It is similar to a dictionary and is used to organize and manage variables and functions in your code. In Python, each module, class, and function has its own namespace to avoid […]

07 Test the scope of dependencies in Maven, the delivery principle of dependencies, and the configuration of dependency exclusions

Dependent features scope tag is within the dependencies/dependency tag. Optional values include compile (default value), test, provided, system, runtime, import compile: The jar packages that are actually used when the project is actually running are all dependent on the scope of compile, such as the jar packages required by the third-party framework SSM. test: The […]

Unraveling Android Scoped Storage

Original link Android Scoped Storage Puzzles Android is actually quite confusing when it comes to file storage. In early versions, there was no so-called management of storage. There are many ways to operate file storage, such as through Java native methods (File/InputStream/OutputStream) , and through ContentProvider (openFile/openOutputStream). The path of the file is also quite […]