Framework
Java · 94 notes
- BloomFilterhistorical
These notes begin with Guava BloomFilter usage and trace construction, writes, and lookups through hashing and bit-array operations.
- How Lombok Workshistorical
Lombok generates code through annotation processing during javac compilation. These notes examine how that process works.
- Introductionhistorical
JDBC embeds SQL in Java, while Hibernate's object mapping involves flexibility trade-offs. These notes introduce MyBatis through those issues.
- Spring Cloudhistorical
Spring Cloud provides microservice components on top of Spring Boot. These notes organize gateways, discovery, configuration, monitoring, load balancing, and circuit breaking.
- Spring Boothistorical
Spring Boot builds on Spring with auto-configuration for starting projects quickly. These notes connect usage with related auto-configuration topics.
- 2.7 Introductionhistorical
Spring MVC uses DispatcherServlet as its entry point, with HandlerMapping, HandlerAdapter, and ViewResolver handling requests and views.
- RateLimiterhistorical
Guava RateLimiter provides a rate-limiting utility based on the token-bucket approach. These notes begin with usage and continue into its implementation.
- Usagehistorical
JDBC properties, MyBatis configuration, and mapper files demonstrate the basic integration of MyBatis into a project.
- 2.10 Spring Moduleshistorical
Spring Framework consists of multiple modules, with its core layer providing container capabilities. These notes organize responsibilities by module.
- 2.12 Usagehistorical
These notes start with dependencies and web.xml to demonstrate Spring MVC setup and how DispatcherServlet connects to framework configuration.
- MyBatis Source Analysishistorical
MyBatis can add interceptors through dynamic proxies when creating core objects. These notes trace the plugin mechanism through its four main objects.
- Spring MVC Source Analysishistorical
Controller breakpoints reveal the request call stack, which these notes follow through HttpServlet, FrameworkServlet, and DispatcherServlet.
- Thread Safetyhistorical
Mutable instance fields in singleton Spring MVC objects can cause problems under concurrent updates. These notes examine thread-safety approaches through that case.
- Usagehistorical
Server and client examples demonstrate basic Netty usage, including startup and request handling.
- Netty 3.x Source Analysishistorical
Netty 3.x creates thread pools and initializes Boss and Worker components. These notes trace its networking implementation through thread organization.
- 2.20 Apollohistorical
Apollo centrally manages configuration and stores changes in a database. These notes examine how clients obtain changes after publication.
- Eurekahistorical
Eureka provides service registration and discovery through a client-server architecture. These notes examine how registrations are stored and maintained.
- Feignhistorical
Feign invokes remote interfaces. These notes examine declarative calls through annotations, Ribbon, RestTemplate, and related components.
- Gatewayhistorical
Spring Cloud Gateway processes requests through routes, predicates, and filters. These notes begin with Route composition and examine matching and forwarding.
- Hystrixhistorical
Hystrix provides fault tolerance for microservice calls. These notes start with failure propagation and examine circuit breaking, fallback, and related mechanisms.
- 2.25 Ribbonhistorical
Ribbon is a client-side load-balancing component. These notes introduce its need and examine selection and execution during service calls.
- 2.26 Sleuthhistorical
Sleuth records traces for Spring Cloud calls and can work with Zipkin to display interactions between services.
- Zuulhistorical
Zuul is a Spring Cloud gateway component. These notes cover routing, filtering, and traffic-based rollout of new features.
- ApplicationListenerhistorical
ApplicationListener uses the observer pattern to decouple event publishers from listeners. These notes illustrate it with separate email and logging actions after ticket events.
- Bean Scopeshistorical
Singleton scope returns the same bean from the container, while prototype scope creates a new instance each time. These notes examine scope behavior.
- Usagehistorical
Examples such as HelloWorld demonstrate Spring AOP usage and the relationship between aspect configuration and target-method calls.
- Usagehistorical
Examples such as AopConfig and Calc demonstrate Spring AOP configuration and how aspects work with target objects.
- 2.32 Autowired Principlehistorical
Spring handles dependency injection during post-processor registration and bean creation. These notes trace @Autowired through AutowiredAnnotationBeanPostProcessor.
- Spring Transaction Source Analysishistorical
@EnableTransactionManagement imports transaction-management components. These notes trace registration and execution of Spring transaction objects from that annotation.
- 2.34 Custom Startershistorical
A custom starter begins with its dependencies and auto-configuration. These notes organize the steps for extending Spring Boot.
- 2.35 Usagehistorical
Application and test-class examples demonstrate Spring Boot caching, including application configuration and cache calls.
- Spring Boot Jar Startup Principlehistorical
Project configuration and main-class examples introduce how a Spring Boot application starts after being packaged as a Jar.
- MyBatis Auto-Configurationhistorical
Spring Boot creates MyBatis-related objects through auto-configuration. These notes trace integration through configuration-class initialization callbacks.
- Spring MVC Auto-Configuration Principlehistorical
Spring Boot configures Web MVC through WebMvcAutoConfiguration. These notes examine the objects and methods through its inner configuration class.
- 2.39 Usagehistorical
Examples such as Application demonstrate basic Spring Boot usage, including configuration and startup.
- Embedded Tomcat Auto-Configuration Principlehistorical
Spring Boot creates an embedded Servlet container according to dependencies on the classpath. These notes trace auto-configuration using Tomcat as an example.
- Learning Resourceshistorical
This page collects Netty learning references for further study of framework usage and source-code analysis.
- Summaryhistorical
This page connects Netty source-analysis topics on server startup, Channel registration, and port binding through their call relationships.
- 2.43 Thread Isolationhistorical
Thread isolation separates calls into distinct thread resources to prevent failing calls from exhausting a service. These notes use Hystrix configuration and execution as examples.
- Bean Lifecyclehistorical
A Spring bean is instantiated and then undergoes property injection and further processing. These notes organize its lifecycle stages and extension points.
- What Spring AOP Ishistorical
AOP adds cross-cutting behavior without directly changing business code. These notes use logging to explain separating aspects from business logic.
- What It Ishistorical
IOC delegates object creation and management to a container, from which business code obtains dependencies. These notes compare that arrangement with manual construction.
- 2.47 Common Spring Annotationshistorical
Spring annotations declare configuration classes, scan components, and register objects in the IOC container. These notes organize common annotations and their usage.
- Spring Transaction Propagationhistorical
Transaction propagation behavior is an enhancement that Spring provides on top of database transactions. It describes how a transaction propagates when a method annotated with a particular propagation behavior is nested inside another method.
- Spring Boot Cache Auto-Configuration Principlehistorical
Spring Boot creates cache-management objects through cache auto-configuration. These notes trace configuration selection and object creation from CacheAutoConfiguration.
- Component Introductionhistorical
Netty is an asynchronous event-driven networking framework built around Java I/O. These notes organize its main roles through components such as Bootstrap.
- Off-Heap Memoryhistorical
Off-heap memory lies outside the Java heap. These notes compare ByteBuffer allocation approaches and their relationship to data transfer.
- BeanFactoryhistorical
BeanFactory instantiates, configures, and manages beans, while ApplicationContext adds further capabilities. These notes examine relationships among container interfaces.
- 2.53 Usagehistorical
DbConfig and Service examples demonstrate Spring transaction usage and the relationship between data-source configuration and transactional methods.
- Circular Dependencieshistorical
Circular Dependencies: Suppose there are two Beans, Bean1 and Bean2. If Bean1 depends on Bean2, and Bean2 depends on Bean1, then when Spring creates Bean1 it first needs to create Bean2, while creating Bean2 requires creating Bean1 first.
- How to Load Beans A and B in Order in Springhistorical
Controller and Service examples examine loading relationships between Spring beans and ways to control their initialization order.
- 2.56 1. Create NioEventLoopGrouphistorical
NioEventLoopGroup manages multiple NioEventLoops and accepts Runnable tasks. These notes trace how the group is created through its constructors.
- 2. Bootstrap Creationhistorical
After creating ServerBootstrap, Channel types, handlers, and options must be configured. These notes focus on how the Channel type is set.
- 3. Bind the Porthistorical
These notes follow bind calls to examine how Netty port-binding requests reach the concrete Channel implementation.
- 1. Detect a New Connectionhistorical
When a connection arrives, NioEventLoop handles an OP_ACCEPT event. These notes trace connection detection with breakpoints and a client connection.
- Pipeline Initializationhistorical
Each Netty Channel has its own pipeline, created during AbstractChannel construction. These notes examine pipeline initialization.
- 1. Creating the Serverhistorical
Starting from the server bind method, these notes follow the call chain to AbstractBootstrap.doBind and examine server creation.
- 1. Create the Spring Containerhistorical
Creating a Spring container triggers refresh. These notes trace container initialization and bean retrieval from ApplicationContext creation.
- Spring Boot Startup Principlehistorical
These notes start with a Spring Boot application's startup statement and trace the startup process while omitting simple nested calls.
- Create Executorhistorical
These notes trace Netty Executor creation, starting with the thread factory and executor initialization.
- 2. Create NioSocketChannelhistorical
Netty wraps accepted Java NIO connections in NioSocketChannel. These notes trace construction of that object and its parent classes.
- Adding and Removing ChannelHandlershistorical
These notes begin with methods such as DefaultChannelPipeline.addLast and trace ChannelHandler insertion, validation, and removal.
- 2. Server Initializationhistorical
These notes follow bind and doBind calls to trace the work performed during Netty server initialization.
- 2. Call BeanFactoryPostProcessor's postProcess Methodhistorical
Spring invokes BeanFactoryPostProcessors during container refresh. These notes trace their execution from invokeBeanFactoryPostProcessors.
- Spring Boot Auto-Configuration Principlehistorical
@SpringBootApplication connects annotations such as @EnableAutoConfiguration. These notes trace how Spring Boot auto-configuration takes effect from those entry points.
- Create the NioEventLoop Arrayhistorical
NioEventLoopGroup creates individual NioEventLoops through newChild. These notes follow that call to examine event-loop-array initialization.
- 3. Allocate a Thread and Register the Selectorhistorical
After a new connection passes through the pipeline, it needs a processing thread and Selector registration. These notes trace the related calls from connection acceptance.
- 3. Register the Selectorhistorical
Starting from the server's bind call, these notes trace how a Channel is assigned an event loop and registered with the Selector.
- 3. Register BeanPostProcessorhistorical
Spring registers bean post-processors through registerBeanPostProcessors. These notes follow the delegated calls that perform registration.
- 4. Register Read Events with the Selectorhistorical
After Channel registration, read events must be registered with the Selector. These notes trace the process through AbstractChannel's register operation.
- 4. Bind the Server Porthistorical
These notes trace the server bind call chain to examine how Netty binds a listening port to the underlying network channel.
- Spring IoC Source: Instantiating All Non-Lazy Singleton Beanshistorical
FinishBeanFactoryInitialization instantiates non-lazy singleton beans. These notes focus on the execution of preInstantiateSingletons.
- Server Startuphistorical
This page organizes Netty server-startup analysis into creation, initialization, Selector registration, and port binding.
- UML Diagramhistorical
UML diagrams organize relationships among Spring IOC classes as a structural reference for reading container source code.
- 2.79 1. Instantiate the Channelhistorical
Netty invokes the NioServerSocketChannel constructor through reflection and creates the underlying Java NIO channel. These notes trace that instantiation.
- Netty Bind Source: Actually Binding the Listening Porthistorical
Netty wraps port binding as a task for the Channel's NioEventLoop. These notes trace the calls after task submission.
- Inbound Eventshistorical
Experiments with multiple InboundHandlers show how Netty inbound events propagate through the pipeline.
- ByteBufhistorical
ByteBuf uses reader and writer indexes to divide consumed, readable, and writable regions. These notes examine read and write API behavior through those indexes.
- 1. Inject AspectJAnnotationAutoProxyCreator into the Containerhistorical
Enabling @EnableAspectJAutoProxy imports AOP components into Spring. These notes trace automatic proxy creator registration from the annotation's source.
- 2.1 How the AnnotationAwareAspectJAutoProxyCreator Bean Instance Is Createdhistorical
AnnotationAwareAspectJAutoProxyCreator is both a bean post-processor and BeanFactoryAware. These notes use breakpoints to examine its creation and initialization.
- Spring AOP Source Analysis Summaryhistorical
Spring AOP's automatic proxy creator participates in bean initialization and generates proxies at the relevant stage. This page summarizes related interfaces and call relationships.
- 2. Initialize Channelhistorical
Channel initialization adds a ChannelInitializer to the pipeline and connects the handlers configured in ServerBootstrap.
- Netty Source: NioEventLoop run Methodhistorical
NioEventLoop's run method repeatedly processes I/O events and tasks. These notes separate the main parts of the loop and trace execution.
- Outbound Eventshistorical
Code examples with multiple OutboundHandlers show how Netty outbound events propagate through the pipeline.
- ByteBufAllocatorhistorical
ByteBufAllocator allocates ByteBuf instances. These notes follow the abstract buffer method to examine choices such as heap and direct memory.
- 2.2 When Does AnnotationAwareAspectJAutoProxyCreator Take Effect?historical
Breakpoints around bean initialization show when AnnotationAwareAspectJAutoProxyCreator participates in the bean lifecycle.
- 2.91 3. Register the Channelhistorical
A server Channel uses EventLoopGroup to choose an event loop and register itself. These notes trace the process through ServerBootstrap calls.
- Exception Eventshistorical
Server and Handler examples generate exceptions to examine how Netty propagates and handles exception events in the pipeline.
- Usagehistorical
Code examples record Netty memory-related usage and provide a practical starting point for reading allocator implementations.
- 2.3 How AnnotationAwareAspectJAutoProxyCreator Creates Proxy Objectshistorical
These notes follow target-bean creation through the automatic proxy creator to examine aspect checks and proxy generation.
- Channel Class Hierarchyhistorical
Channel abstracts network I/O in Netty. These notes examine skeletal implementations and relationships among channel types through the class hierarchy.
- 2.4 How the Target Method Is Executedhistorical
Calls to a proxied target enter an interceptor. These notes trace the interceptor chain and target execution from CglibAopProxy.intercept.
- PooledByteBufAllocatorhistorical
PooledByteBufAllocator obtains a thread cache and its PoolArena, then allocates memory through the arena. These notes trace both stages.
- PoolThreadCachehistorical
PoolThreadCache creates caches for memory regions of different sizes. These notes examine initialization of tiny, small, and normal MemoryRegionCache instances.