Springboot extension point series_ApplicationContextInitializer

1. Functions of ApplicationContextInitializer At the beginning of Spring container initialization, all implementations of the ApplicationContextInitializer interface will be instantiated in the class; Before the Spring container is refreshed, the org.springframework.context.ApplicationContextInitializer#initialize method of all implementation classes will be called. The formal parameter type of the initialize method is ConfigurableApplicationContext, so it can be considered that […]

The pitfalls of using Spring Initializer to create a springboot project [Nanny-level tutorial]

Project scenario: Tips: Here is a brief description of the problems and solutions encountered after the project was created: After idea uses Spring Initializer to create the springboot project, There are following questions: ① There is no Run when right-clicking ② Right-click New to create a new file and find that there is no Java […]

Solve Instructions for updating: Use tf.global_variables_initializer instead.

Table of Contents Solve Instructions for updating: Use tf.global_variables_initializer instead background solution Issues referencing old code Summarize Application scenarios Sample code Solution to Instructions for updating: Use tf.global_variables_initializer instead Recently, when using TensorFlow for model training, I encountered a warning message: Instructions for updating: Use ??tf.global_variables_initializer?? instead. This warning points out that when using TensorFlow […]

[Gitblit] When the server deploys and runs Gitblit.cmd, it keeps reporting the error java.lang.ExceptionInInitializerError

When deploying Gitblit on the server side, running Gitblit.cmd keeps reporting an error java.lang.ExceptionInInitializerError. The detailed error information is as follows: java.lang.ExceptionInInitializerError java.lang.ExceptionInInitializerError at com.google.inject.internal.cglib.reflect.$FastClassEmitter.<init>(FastClassEmitter.java:67) at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:72) at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:216) at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:64) at com.google.inject.internal.BytecodeGen.newFastClass(BytecodeGen.java:204) at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.<init>(ProviderMethod.java:256) at com.google.inject.internal.ProviderMethod.create(ProviderMethod.java:71) at com.google.inject.internal.ProviderMethodsModule.createProviderMethod(ProviderMethodsModule.java:275) at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:144) at com.google.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:123) at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340) at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:349) at com.google.inject.AbstractModule.install(AbstractModule.java:122) at com.google.inject.servlet.ServletModule.configure(ServletModule.java:52) at com.google.inject.AbstractModule.configure(AbstractModule.java:62) […]

[C++11] Curly braces {}, initializer_list, auto, decltype

Article directory 1. Expansion of curly braces { } 2.initializer_list 3.auto 4.decltype 5. Addition of containers 5.1array[useless] 5.2forward_list[useless] 5.3unordered_map/unordered_set 5.4 Unified increase 6. Zhihu articles 1. Expansion of curly braces { } int main() {<!– –> //C++98 curly braces {} support 1. Array 2. Structure struct Point {<!– –> int _x; int _y; }; int […]

Springboot extension point ApplicationContextInitializer

Collection of implementation methods and working principles of Springboot extension point series: Springboot extension point ApplicationContextInitializer Springboot extension point BeanFactoryPostProcessor Springboot extension point BeanDefinitionRegistryPostProcessor Springboot extension point BeanPostProcessor Springboot extension point InstantiationAwareBeanPostProcessor Springboot extension point SmartInstantiationAwareBeanPostProcessor Springboot extension point ApplicationContextAwareProcessor Springboot extension point @PostConstruct Springboot extension point InitializingBean Springboot extension point SmartInitializingSingleton Springboot extension point […]

[C++11]{}Initialization, std::initializer_list, decltype, STL new containers

Article directory 1. Introduction to C++11 2. Unified list initialization 2.1 {}Initialization 2.2 std::initializer_list 3. Statement 3.1auto 3.2 decltype 4.nullptr 5. Range for loop 6. Smart pointers 7. Some changes in C++11STL 8. Demo code 1. Introduction to C++11 In 2003, the C++ Standards Committee submitted a technical errata (TC1 for short), which made the […]

How to solve ClassNotFoundException, NoClassDefFoundError and ExceptionInitializerError

1. ClassNotFoundException 1. Introduction ClassNotFoundException is a checked exception. Thrown when the application attempts to load a class by its string name, but a class with the specified name is not found in the classpath. Generally occurs in Class.forName(String), ClassLoader.findSystemClass(String), ClassLoader.loadClass(String, boolean) 2. Common reasons The essence of this exception is: there is no classes […]

java.lang.ExceptionInInitializerError: null Caused by: java.lang.reflect.InaccessibleObjectException

java.lang.ExceptionInInitializerError: null at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:989) ~[xstream-1.4.10.jar:1.4.10] at com.thoughtworks.xstream.XStream.<init>(XStream.java:592) ~[xstream-1.4.10.jar:1.4.10] at com.thoughtworks.xstream.XStream.<init>(XStream.java:514) ~[xstream-1.4.10.jar:1.4.10] at com.thoughtworks.xstream.XStream.<init>(XStream.java:483) ~[xstream-1.4.10.jar:1.4.10] at com.thoughtworks.xstream.XStream.<init>(XStream.java:429) ~[xstream-1.4.10.jar:1.4.10] at com.thoughtworks.xstream.XStream.<init>(XStream.java:396) ~[xstream-1.4.10.jar:1.4.10] at com.netflix.discovery.converters.XmlXStream.<init>(XmlXStream.java:51) ~[eureka-client-1.9.8.jar:1.9.8] at com.netflix.discovery.converters.XmlXStream.<clinit>(XmlXStream.java:42) ~[eureka-client-1.9.8.jar:1.9.8] at com.netflix.discovery.converters.wrappers.CodecWrappers$XStreamXml.<init>(CodecWrappers.java:358) ~[eureka-client-1.9.8.jar:1.9.8] at com.netflix.discovery.converters.wrappers.CodecWrappers.create(CodecWrappers.java:133) ~[eureka-client-1.9.8.jar:1.9.8] at com.netflix.discovery.converters.wrappers.CodecWrappers.getEncoder(CodecWrappers.java:75) ~[eureka-client-1.9.8.jar:1.9.8] at com.netflix.discovery.converters.wrappers.CodecWrappers.getEncoder(CodecWrappers.java:66) ~[eureka-client-1.9.8.jar:1.9.8] at com.netflix.discovery.provider.DiscoveryJerseyProvider.<init>(DiscoveryJerseyProvider.java:77) ~[eureka-client-1.9.8.jar:1.9.8] at com.netflix.discovery.provider.DiscoveryJerseyProvider.<init>(DiscoveryJerseyProvider.java:64) ~[eureka-client-1.9.8.jar:1.9.8] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na] at […]

Solve NoSuchMethodError, maven dependency conflicts, jar package conflicts, SecurityException, ExceptionInInitializerError problems.

Three main solutions to maven dependency conflicts: 1. When one of the conflicts is compatible with the other, it is resolved through the exclusions and exclusion tags. 2. When the conflict is incompatible with each other, use the maven-shade-plugin management plugin to resolve it. 3. Overwrite the code in the jar package and solve it […]