code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
package cn.bugstack.springframework.core.convert.converter; /** * A converter converts a source object of type {@code S} to a target of type {@code T}. * * 类型转换处理接口 * * * * * * * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public interface Converter<S, T> { /** Convert the source object of ...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/convert/converter/Converter.java
Java
apache-2.0
414
package cn.bugstack.springframework.core.convert.converter; /** * A factory for "ranged" converters that can convert objects from S to subtypes of R. * * 类型转换工厂 * * * * * * * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public interface ConverterFactory<S, R>{ /** * Get the converter to ...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/convert/converter/ConverterFactory.java
Java
apache-2.0
613
package cn.bugstack.springframework.core.convert.converter; /** * For registering converters with a type conversion system. * * 类型转换注册接口 * * * * * * * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public interface ConverterRegistry { /** * Add a plain converter to this registry. * Th...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/convert/converter/ConverterRegistry.java
Java
apache-2.0
1,040
package cn.bugstack.springframework.core.convert.converter; import cn.hutool.core.lang.Assert; import java.util.Set; /** * Generic converter interface for converting between two or more types. * <p> * 通用的转换接口 * <p> * * * * * * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public interface Generic...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/convert/converter/GenericConverter.java
Java
apache-2.0
2,208
package cn.bugstack.springframework.core.convert.support; import cn.bugstack.springframework.core.convert.converter.ConverterRegistry; /** * A specialization of {@link GenericConversionService} configured by default * with converters appropriate for most environments. * * * * * * * 作者:DerekYRC https://github...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/convert/support/DefaultConversionService.java
Java
apache-2.0
731
package cn.bugstack.springframework.core.convert.support; import cn.bugstack.springframework.core.convert.ConversionService; import cn.bugstack.springframework.core.convert.converter.Converter; import cn.bugstack.springframework.core.convert.converter.ConverterFactory; import cn.bugstack.springframework.core.convert.c...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/convert/support/GenericConversionService.java
Java
apache-2.0
5,621
package cn.bugstack.springframework.core.convert.support; import cn.bugstack.springframework.core.convert.converter.Converter; import cn.bugstack.springframework.core.convert.converter.ConverterFactory; import cn.bugstack.springframework.util.NumberUtils; import org.jetbrains.annotations.Nullable; /** * Converts fro...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/convert/support/StringToNumberConverterFactory.java
Java
apache-2.0
1,200
package cn.bugstack.springframework.core.io; import cn.bugstack.springframework.util.ClassUtils; import cn.hutool.core.lang.Assert; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; public class ClassPathResource implements Resource { private final String path; p...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/io/ClassPathResource.java
Java
apache-2.0
1,029
package cn.bugstack.springframework.core.io; import cn.hutool.core.lang.Assert; import java.net.MalformedURLException; import java.net.URL; public class DefaultResourceLoader implements ResourceLoader { @Override public Resource getResource(String location) { Assert.notNull(location, "Location must ...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/io/DefaultResourceLoader.java
Java
apache-2.0
756
package cn.bugstack.springframework.core.io; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; public class FileSystemResource implements Resource { private final File file; private final String path; public FileSystemResource(File file) { ...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/io/FileSystemResource.java
Java
apache-2.0
699
package cn.bugstack.springframework.core.io; import java.io.IOException; import java.io.InputStream; public interface Resource { InputStream getInputStream() throws IOException; }
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/io/Resource.java
Java
apache-2.0
188
package cn.bugstack.springframework.core.io; public interface ResourceLoader { /** * Pseudo URL prefix for loading from the class path: "classpath:" */ String CLASSPATH_URL_PREFIX = "classpath:"; Resource getResource(String location); }
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/io/ResourceLoader.java
Java
apache-2.0
263
package cn.bugstack.springframework.core.io; import cn.hutool.core.lang.Assert; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; public class UrlResource implements Resource{ private final URL url; public UrlResou...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/core/io/UrlResource.java
Java
apache-2.0
807
package cn.bugstack.springframework.stereotype; import java.lang.annotation.*; /** * Indicates that an annotated class is a "component". * Such classes are considered as candidates for auto-detection * when using annotation-based configuration and classpath scanning. */ @Target(ElementType.TYPE) @Retention(Retent...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/stereotype/Component.java
Java
apache-2.0
416
package cn.bugstack.springframework.util; import java.lang.annotation.Annotation; import java.util.Set; public class ClassUtils { public static ClassLoader getDefaultClassLoader() { ClassLoader cl = null; try { cl = Thread.currentThread().getContextClassLoader(); } cat...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/util/ClassUtils.java
Java
apache-2.0
1,409
package cn.bugstack.springframework.util; import cn.hutool.core.lang.Assert; import org.jetbrains.annotations.Nullable; import java.math.BigDecimal; import java.math.BigInteger; import java.text.DecimalFormat; import java.text.NumberFormat; import java.text.ParseException; import java.util.Collections; import java.ut...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/util/NumberUtils.java
Java
apache-2.0
12,939
package cn.bugstack.springframework.util; /** * Simple strategy interface for resolving a String value. * Used by {@link cn.bugstack.springframework.beans.factory.config.ConfigurableBeanFactory}. * <p> * * * * * * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public interface StringValueResolver { ...
2302_77879529/spring
small-spring-step-17/src/main/java/cn/bugstack/springframework/util/StringValueResolver.java
Java
apache-2.0
375
package cn.bugstack.springframework.test.bean; import java.time.LocalDate; public class Husband { private String wifiName; private LocalDate marriageDate; public String getWifiName() { return wifiName; } public void setWifiName(String wifiName) { this.wifiName = wifiName; }...
2302_77879529/spring
small-spring-step-17/src/test/java/cn/bugstack/springframework/test/bean/Husband.java
Java
apache-2.0
709
package cn.bugstack.springframework.test.converter; import cn.bugstack.springframework.beans.factory.FactoryBean; import java.util.HashSet; import java.util.Set; /** * @author derekyi * @date 2021/1/17 */ public class ConvertersFactoryBean implements FactoryBean<Set<?>> { @Override public Set<?> getObject() th...
2302_77879529/spring
small-spring-step-17/src/test/java/cn/bugstack/springframework/test/converter/ConvertersFactoryBean.java
Java
apache-2.0
688
package cn.bugstack.springframework.test.converter; import cn.bugstack.springframework.core.convert.converter.Converter; /** * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public class StringToIntegerConverter implements Converter<String, Integer> { @Override public Integer convert(String source)...
2302_77879529/spring
small-spring-step-17/src/test/java/cn/bugstack/springframework/test/converter/StringToIntegerConverter.java
Java
apache-2.0
378
package cn.bugstack.springframework.test.converter; import cn.bugstack.springframework.core.convert.converter.Converter; import java.time.LocalDate; import java.time.format.DateTimeFormatter; /** * @author derekyi * @date 2021/1/17 */ public class StringToLocalDateConverter implements Converter<String, LocalDate>...
2302_77879529/spring
small-spring-step-17/src/test/java/cn/bugstack/springframework/test/converter/StringToLocalDateConverter.java
Java
apache-2.0
613
package cn.bugstack.springframework.aop; import org.aopalliance.intercept.MethodInterceptor; /** * Base class for AOP proxy configuration managers. * These are not themselves AOP proxies, but subclasses of this class are * normally factories from which AOP proxy instances are obtained directly. * <p> * 博客:https:...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/AdvisedSupport.java
Java
apache-2.0
1,753
package cn.bugstack.springframework.aop; import org.aopalliance.aop.Advice; /** * Base interface holding AOP <b>advice</b> (action to take at a joinpoint) * and a filter determining the applicability of the advice (such as * a pointcut). <i>This interface is not for use by Spring users, but to * allow for commona...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/Advisor.java
Java
apache-2.0
993
package cn.bugstack.springframework.aop; import org.aopalliance.aop.Advice; /** * Common marker interface for before advice, such as {@link MethodBeforeAdvice}. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/Dere...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/BeforeAdvice.java
Java
apache-2.0
491
package cn.bugstack.springframework.aop; /** * Filter that restricts matching of a pointcut or introduction to * a given set of target classes. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/ClassFilter.java
Java
apache-2.0
705
package cn.bugstack.springframework.aop; import java.lang.reflect.Method; /** * Advice invoked before a method is invoked. Such advices cannot * prevent the method call proceeding, unless they throw a Throwable. * <p> * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/MethodBeforeAdvice.java
Java
apache-2.0
1,177
package cn.bugstack.springframework.aop; import java.lang.reflect.Method; /** * Part of a {@link Pointcut}: Checks whether the target method is eligible for advice. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/MethodMatcher.java
Java
apache-2.0
694
package cn.bugstack.springframework.aop; /** * Core Spring pointcut abstraction. * * <p>A pointcut is composed of a {@link ClassFilter} and a {@link MethodMatcher}. * Both these basic terms and a Pointcut itself can be combined to build up combinations * <p> * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/Pointcut.java
Java
apache-2.0
906
package cn.bugstack.springframework.aop; /** * Superinterface for all Advisors that are driven by a pointcut. * This covers nearly all advisors except introduction advisors, * for which method-level matching doesn't apply. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fus...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/PointcutAdvisor.java
Java
apache-2.0
653
package cn.bugstack.springframework.aop; import cn.bugstack.springframework.util.ClassUtils; /** * A <code>TargetSource</code> is used to obtain the current "target" of * an AOP invocation, which will be invoked via reflection if no around * advice chooses to end the interceptor chain itself. * <p> * 被代理的目标对象 *...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/TargetSource.java
Java
apache-2.0
1,657
package cn.bugstack.springframework.aop.aspectj; import cn.bugstack.springframework.aop.ClassFilter; import cn.bugstack.springframework.aop.MethodMatcher; import cn.bugstack.springframework.aop.Pointcut; import org.aspectj.weaver.tools.PointcutExpression; import org.aspectj.weaver.tools.PointcutParser; import org.aspe...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/aspectj/AspectJExpressionPointcut.java
Java
apache-2.0
2,052
package cn.bugstack.springframework.aop.aspectj; import cn.bugstack.springframework.aop.Pointcut; import cn.bugstack.springframework.aop.PointcutAdvisor; import org.aopalliance.aop.Advice; /** * Spring AOP Advisor that can be used for any AspectJ pointcut expression. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java
Java
apache-2.0
1,233
package cn.bugstack.springframework.aop.framework; /** * Delegate interface for a configured AOP proxy, allowing for the creation * of actual proxy objects. * * <p>Out-of-the-box implementations are available for JDK dynamic proxies * and for CGLIB proxies, as applied by DefaultAopProxyFactory * * AOP 代理的抽象 * ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/framework/AopProxy.java
Java
apache-2.0
666
package cn.bugstack.springframework.aop.framework; import cn.bugstack.springframework.aop.AdvisedSupport; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; import net.sf.cglib.proxy.MethodProxy; import java.lang.reflect.Method; /** * CGLIB2-based {@link AopProxy} implementation for th...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/framework/Cglib2AopProxy.java
Java
apache-2.0
2,542
package cn.bugstack.springframework.aop.framework; import cn.bugstack.springframework.aop.AdvisedSupport; import org.aopalliance.intercept.MethodInterceptor; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * JDK-based {@link AopProxy} implementation f...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/framework/JdkDynamicAopProxy.java
Java
apache-2.0
1,639
package cn.bugstack.springframework.aop.framework; import cn.bugstack.springframework.aop.AdvisedSupport; /** * Factory for AOP proxies for programmatic use, rather than via a bean * factory. This class provides a simple way of obtaining and configuring * AOP proxies in code. * <p> * 博客:https://bugstack.cn - 沉淀、...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/framework/ProxyFactory.java
Java
apache-2.0
1,049
package cn.bugstack.springframework.aop.framework; import org.aopalliance.intercept.MethodInvocation; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Method; /** * <p>Invokes the target object using reflection. Subclasses can override the * #invokeJoinpoint() method to change this behavior, so ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/framework/ReflectiveMethodInvocation.java
Java
apache-2.0
1,558
package cn.bugstack.springframework.aop.framework.adapter; import cn.bugstack.springframework.aop.MethodBeforeAdvice; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; /** * Interceptor to wrap am {@link cn.bugstack.springframework.aop.MethodBeforeAdvice}. * Used...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java
Java
apache-2.0
1,131
package cn.bugstack.springframework.aop.framework.autoproxy; import cn.bugstack.springframework.aop.*; import cn.bugstack.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor; import cn.bugstack.springframework.aop.framework.ProxyFactory; import cn.bugstack.springframework.beans.BeansException; import cn.bugst...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java
Java
apache-2.0
4,197
package cn.bugstack.springframework.beans; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public class BeansException extends RuntimeException { public BeansException(String msg) { ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/BeansException.java
Java
apache-2.0
538
package cn.bugstack.springframework.beans; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring * * bean 属性信息 */ public class PropertyValue { private final String name; private final Ob...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/PropertyValue.java
Java
apache-2.0
676
package cn.bugstack.springframework.beans; import java.util.ArrayList; import java.util.List; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public class PropertyValues { private fin...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/PropertyValues.java
Java
apache-2.0
1,303
package cn.bugstack.springframework.beans.factory; /** * Marker superinterface indicating that a bean is eligible to be * notified by the Spring container of a particular framework object * through a callback-style method. Actual method signature is * determined by individual subinterfaces, but should typically ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/Aware.java
Java
apache-2.0
799
package cn.bugstack.springframework.beans.factory; /** * Callback that allows a bean to be aware of the bean * {@link ClassLoader class loader}; that is, the class loader used by the * present bean factory to load bean classes. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/BeanClassLoaderAware.java
Java
apache-2.0
626
package cn.bugstack.springframework.beans.factory; import cn.bugstack.springframework.beans.BeansException; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public interface BeanFactory { ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/BeanFactory.java
Java
apache-2.0
1,650
package cn.bugstack.springframework.beans.factory; import cn.bugstack.springframework.beans.BeansException; /** * Interface to be implemented by beans that wish to be aware of their * owning {@link BeanFactory}. * * 实现此接口,既能感知到所属的 BeanFactory * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/BeanFactoryAware.java
Java
apache-2.0
679
package cn.bugstack.springframework.beans.factory; /** * Interface to be implemented by beans that want to be aware of their * bean name in a bean factory. Note that it is not usually recommended * that an object depend on its bean name, as this represents a potentially * brittle dependence on external configurati...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/BeanNameAware.java
Java
apache-2.0
753
package cn.bugstack.springframework.beans.factory; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.config.AutowireCapableBeanFactory; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import cn.bugstack.springframework.beans.factory.config...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/ConfigurableListableBeanFactory.java
Java
apache-2.0
1,206
package cn.bugstack.springframework.beans.factory; /** * Interface to be implemented by beans that want to release resources * on destruction. A BeanFactory is supposed to invoke the destroy * method if it disposes a cached singleton. An application context * is supposed to dispose all of its singletons on close. ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/DisposableBean.java
Java
apache-2.0
672
package cn.bugstack.springframework.beans.factory; /** * Interface to be implemented by objects used within a {@link BeanFactory} * which are themselves factories. If a bean implements this interface, * it is used as a factory for an object to expose, not directly as a bean * instance that will be exposed itself. ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/FactoryBean.java
Java
apache-2.0
744
package cn.bugstack.springframework.beans.factory; /** * Sub-interface implemented by bean factories that can be part * of a hierarchy. */ public interface HierarchicalBeanFactory extends BeanFactory { }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/HierarchicalBeanFactory.java
Java
apache-2.0
209
package cn.bugstack.springframework.beans.factory; /** * Interface to be implemented by beans that need to react once all their * properties have been set by a BeanFactory: for example, to perform custom * initialization, or merely to check that all mandatory properties have been set. * * 实现此接口的 Bean 对象,会在 BeanFa...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/InitializingBean.java
Java
apache-2.0
932
package cn.bugstack.springframework.beans.factory; import cn.bugstack.springframework.beans.BeansException; import java.util.Map; /** * Extension of the {@link BeanFactory} interface to be implemented by bean factories * that can enumerate all their bean instances, rather than attempting bean lookup * by name one...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/ListableBeanFactory.java
Java
apache-2.0
1,213
package cn.bugstack.springframework.beans.factory; import cn.bugstack.springframework.beans.BeansException; /** * Defines a factory which can return an Object instance * (possibly shared or independent) when invoked. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/ObjectFactory.java
Java
apache-2.0
579
package cn.bugstack.springframework.beans.factory; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.PropertyValue; import cn.bugstack.springframework.beans.PropertyValues; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import cn.bugstack.springf...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/PropertyPlaceholderConfigurer.java
Java
apache-2.0
4,274
package cn.bugstack.springframework.beans.factory.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Marks a constructor, field, setter method or config method as to be * autowired by Spri...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/annotation/Autowired.java
Java
apache-2.0
781
package cn.bugstack.springframework.beans.factory.annotation; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.PropertyValues; import cn.bugstack.springframework.beans.factory.BeanFactory; import cn.bugstack.springframework.beans.factory.BeanFactoryAware; import cn.bugs...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
Java
apache-2.0
4,479
package cn.bugstack.springframework.beans.factory.annotation; import java.lang.annotation.*; /** * This annotation may be used on a field or parameter as a qualifier for * candidate beans when autowiring. It may also be used to annotate other * custom annotations that can then in turn be used as qualifiers. * <p>...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/annotation/Qualifier.java
Java
apache-2.0
838
package cn.bugstack.springframework.beans.factory.annotation; import java.lang.annotation.*; /** * Annotation at the field or method/constructor parameter level * that indicates a default value expression for the affected argument. * <p> * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Crea...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/annotation/Value.java
Java
apache-2.0
774
package cn.bugstack.springframework.beans.factory.config; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.BeanFactory; /** * Extension of the {@link cn.bugstack.springframework.beans.factory.BeanFactory} * interface to be implemented by bean factories that a...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/AutowireCapableBeanFactory.java
Java
apache-2.0
1,160
package cn.bugstack.springframework.beans.factory.config; import cn.bugstack.springframework.beans.PropertyValues; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public class BeanDefiniti...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/BeanDefinition.java
Java
apache-2.0
2,224
package cn.bugstack.springframework.beans.factory.config; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.ConfigurableListableBeanFactory; /** * Allows for custom modification of an application context's bean definitions, * adapting the bean property values ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/BeanFactoryPostProcessor.java
Java
apache-2.0
1,049
package cn.bugstack.springframework.beans.factory.config; import cn.bugstack.springframework.beans.BeansException; /** * Factory hook that allows for custom modification of new bean instances, * e.g. checking for marker interfaces or wrapping them with proxies. * * 用于修改新实例化 Bean 对象的扩展点 * * 博客:https://bugstack.c...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/BeanPostProcessor.java
Java
apache-2.0
1,187
package cn.bugstack.springframework.beans.factory.config; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring * * Bean 的引用 */ public class BeanReference { private final String beanName; ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/BeanReference.java
Java
apache-2.0
577
package cn.bugstack.springframework.beans.factory.config; import cn.bugstack.springframework.beans.factory.HierarchicalBeanFactory; import cn.bugstack.springframework.core.convert.ConversionService; import cn.bugstack.springframework.util.StringValueResolver; import org.jetbrains.annotations.Nullable; /** * Configur...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/ConfigurableBeanFactory.java
Java
apache-2.0
1,813
package cn.bugstack.springframework.beans.factory.config; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.PropertyValues; /** * Subinterface of {@link BeanPostProcessor} that adds a before-instantiation callback, * and a callback after instantiation but before expli...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor.java
Java
apache-2.0
2,856
package cn.bugstack.springframework.beans.factory.config; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring * <p> * 单例注册表 */ public interface SingletonBeanRegistry { Object getSingleton(S...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/config/SingletonBeanRegistry.java
Java
apache-2.0
568
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.PropertyValue; import cn.bugstack.springframework.beans.PropertyValues; import cn.bugstack.springframework.beans.factory.*; import cn.bugstack.springframework.bea...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
Java
apache-2.0
12,924
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.core.io.DefaultResourceLoader; import cn.bugstack.springframework.core.io.ResourceLoader; /** * Abstract base class for bean definition readers which implement * the...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/AbstractBeanDefinitionReader.java
Java
apache-2.0
1,353
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.BeanFactory; import cn.bugstack.springframework.beans.factory.FactoryBean; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/AbstractBeanFactory.java
Java
apache-2.0
4,693
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.core.io.Resource; import cn.bugstack.springframework.core.io.ResourceLoader; /** * Simple interface for bean definition readers. * * 博客:https://bugstack.cn - 沉淀、分享、...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/BeanDefinitionReader.java
Java
apache-2.0
979
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:Derek...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/BeanDefinitionRegistry.java
Java
apache-2.0
1,261
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.NoOp; import java.lang.reflect.Constructor; public class CglibSubcl...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java
Java
apache-2.0
932
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.ConfigurableListableBeanFactory; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import cn.bugstack.springframework.beans.factory....
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/DefaultListableBeanFactory.java
Java
apache-2.0
2,946
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.DisposableBean; import cn.bugstack.springframework.beans.factory.ObjectFactory; import cn.bugstack.springframework.beans.factory.config.SingletonBeanRegis...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java
Java
apache-2.0
4,021
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.DisposableBean; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import cn.hutool.core.util.StrUtil; import java.lang.reflect.Meth...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/DisposableBeanAdapter.java
Java
apache-2.0
1,940
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.FactoryBean; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * Support base class for singleton registries which need to handl...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/FactoryBeanRegistrySupport.java
Java
apache-2.0
2,141
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import java.lang.reflect.Constructor; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/InstantiationStrategy.java
Java
apache-2.0
710
package cn.bugstack.springframework.beans.factory.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; /** * 博客:https://bugstack.cn - 沉淀、分享、成...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/support/SimpleInstantiationStrategy.java
Java
apache-2.0
1,318
package cn.bugstack.springframework.beans.factory.xml; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.PropertyValue; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import cn.bugstack.springframework.beans.factory.config.BeanReference; import c...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/beans/factory/xml/XmlBeanDefinitionReader.java
Java
apache-2.0
5,964
package cn.bugstack.springframework.context; import cn.bugstack.springframework.beans.factory.HierarchicalBeanFactory; import cn.bugstack.springframework.beans.factory.ListableBeanFactory; import cn.bugstack.springframework.core.io.ResourceLoader; /** * Central interface to provide configuration for an application. ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/ApplicationContext.java
Java
apache-2.0
878
package cn.bugstack.springframework.context; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.Aware; /** * Interface to be implemented by any object that wishes to be notified * of the {@link ApplicationContext} that it runs in. * * 实现此接口,既能感知到所属的 Applicati...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/ApplicationContextAware.java
Java
apache-2.0
793
package cn.bugstack.springframework.context; import java.util.EventObject; /** * Class to be extended by all application events. Abstract as it * doesn't make sense for generic events to be published directly. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/ApplicationEvent.java
Java
apache-2.0
823
package cn.bugstack.springframework.context; /** * Interface that encapsulates event publication functionality. * Serves as super-interface for ApplicationContext. * * 事件发布者接口 * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https:...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/ApplicationEventPublisher.java
Java
apache-2.0
818
package cn.bugstack.springframework.context; import java.util.EventListener; /** * Interface to be implemented by application event listeners. * Based on the standard <code>java.util.EventListener</code> interface * for the Observer design pattern. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugst...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/ApplicationListener.java
Java
apache-2.0
758
package cn.bugstack.springframework.context; import cn.bugstack.springframework.beans.BeansException; /** * SPI interface to be implemented by most if not all application contexts. * Provides facilities to configure an application context in addition * to the application context client methods in the * {@link cn....
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/ConfigurableApplicationContext.java
Java
apache-2.0
910
package cn.bugstack.springframework.context.annotation; import cn.bugstack.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import cn.bugstack.springframework.beans.factory.support.BeanDefinitionRegistry; import cn.bu...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
Java
apache-2.0
2,745
package cn.bugstack.springframework.context.annotation; import cn.bugstack.springframework.beans.factory.config.BeanDefinition; import cn.bugstack.springframework.stereotype.Component; import cn.hutool.core.util.ClassUtil; import java.util.LinkedHashSet; import java.util.Set; /** * A component provider that scans t...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java
Java
apache-2.0
1,167
package cn.bugstack.springframework.context.annotation; import java.lang.annotation.*; @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Scope { String value() default "singleton"; }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/annotation/Scope.java
Java
apache-2.0
255
package cn.bugstack.springframework.context.event; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.BeanFactory; import cn.bugstack.springframework.beans.factory.BeanFactoryAware; import cn.bugstack.springframework.context.ApplicationEvent; import cn.bugstack.sp...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/event/AbstractApplicationEventMulticaster.java
Java
apache-2.0
4,090
package cn.bugstack.springframework.context.event; import cn.bugstack.springframework.context.ApplicationContext; import cn.bugstack.springframework.context.ApplicationEvent; /** * Base class for events raised for an <code>ApplicationContext</code>. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugsta...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/event/ApplicationContextEvent.java
Java
apache-2.0
1,084
package cn.bugstack.springframework.context.event; import cn.bugstack.springframework.context.ApplicationEvent; import cn.bugstack.springframework.context.ApplicationListener; /** * Interface to be implemented by objects that can manage a number of * {@link ApplicationListener} objects, and publish events to them. ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/event/ApplicationEventMulticaster.java
Java
apache-2.0
1,212
package cn.bugstack.springframework.context.event; /** * Event raised when an <code>ApplicationContext</code> gets closed. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ public class Conte...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/event/ContextClosedEvent.java
Java
apache-2.0
740
package cn.bugstack.springframework.context.event; /** * Event raised when an <code>ApplicationContext</code> gets initialized or refreshed. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/event/ContextRefreshedEvent.java
Java
apache-2.0
763
package cn.bugstack.springframework.context.event; import cn.bugstack.springframework.beans.factory.BeanFactory; import cn.bugstack.springframework.context.ApplicationEvent; import cn.bugstack.springframework.context.ApplicationListener; /** * Simple implementation of the {@link ApplicationEventMulticaster} interfac...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/event/SimpleApplicationEventMulticaster.java
Java
apache-2.0
1,077
package cn.bugstack.springframework.context.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.ConfigurableListableBeanFactory; import cn.bugstack.springframework.beans.factory.config.BeanFactoryPostProcessor; import cn.bugstack.springframework.beans.fact...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/support/AbstractApplicationContext.java
Java
apache-2.0
6,979
package cn.bugstack.springframework.context.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.ConfigurableListableBeanFactory; import cn.bugstack.springframework.beans.factory.support.DefaultListableBeanFactory; /** * Base class for {@link cn.bugstack....
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/support/AbstractRefreshableApplicationContext.java
Java
apache-2.0
1,629
package cn.bugstack.springframework.context.support; import cn.bugstack.springframework.beans.factory.support.DefaultListableBeanFactory; import cn.bugstack.springframework.beans.factory.xml.XmlBeanDefinitionReader; /** * Convenient base class for {@link cn.bugstack.springframework.context.ApplicationContext} * imp...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/support/AbstractXmlApplicationContext.java
Java
apache-2.0
1,318
package cn.bugstack.springframework.context.support; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.config.BeanPostProcessor; import cn.bugstack.springframework.context.ApplicationContext; import cn.bugstack.springframework.context.ApplicationContextAware; /*...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/support/ApplicationContextAwareProcessor.java
Java
apache-2.0
1,323
package cn.bugstack.springframework.context.support; import cn.bugstack.springframework.beans.BeansException; /** * Standalone XML application context, taking the context definition files * from the class path, interpreting plain paths as class path resource names * that include the package path (e.g. "mypackage/m...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/support/ClassPathXmlApplicationContext.java
Java
apache-2.0
1,608