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.context.support; import cn.bugstack.springframework.beans.factory.FactoryBean; import cn.bugstack.springframework.beans.factory.InitializingBean; import cn.bugstack.springframework.core.convert.ConversionService; import cn.bugstack.springframework.core.convert.converter.Converter; i...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/context/support/ConversionServiceFactoryBean.java
Java
apache-2.0
3,012
package cn.bugstack.springframework.core.convert; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable; /** * A service interface for type conversion. This is the entry point into the convert system. * Call {@link #convert(Object, Class)} to perform a thread-safe type conversion usin...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/core/convert/ConversionService.java
Java
apache-2.0
1,005
package cn.bugstack.springframework.core.convert.converter; /** * A converter converts a source object of type {@code S} to a target of type {@code T}. * * 类型转换处理接口 * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/core/convert/converter/Converter.java
Java
apache-2.0
608
package cn.bugstack.springframework.core.convert.converter; /** * A factory for "ranged" converters that can convert objects from S to subtypes of R. * * 类型转换工厂 * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/Der...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/core/convert/converter/ConverterFactory.java
Java
apache-2.0
807
package cn.bugstack.springframework.core.convert.converter; /** * For registering converters with a type conversion system. * * 类型转换注册接口 * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习; * 作者:DerekYRC https://github.com/DerekYRC/mini-spring */ pu...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/core/convert/converter/ConverterRegistry.java
Java
apache-2.0
1,234
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> * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) *...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/core/convert/converter/GenericConverter.java
Java
apache-2.0
2,402
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. * * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/core/convert/support/DefaultConversionService.java
Java
apache-2.0
925
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-18/src/main/java/cn/bugstack/springframework/core/convert/support/GenericConversionService.java
Java
apache-2.0
5,815
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-18/src/main/java/cn/bugstack/springframework/core/convert/support/StringToNumberConverterFactory.java
Java
apache-2.0
1,394
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-18/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-18/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-18/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-18/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-18/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-18/src/main/java/cn/bugstack/springframework/core/io/UrlResource.java
Java
apache-2.0
807
package cn.bugstack.springframework.jdbc; import java.sql.SQLException; /** * @author zhangdd on 2022/2/9 */ public class CannotGetJdbcConnectionException extends RuntimeException { public CannotGetJdbcConnectionException(String message) { super(message); } public CannotGetJdbcConnectionExcept...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/CannotGetJdbcConnectionException.java
Java
apache-2.0
395
package cn.bugstack.springframework.jdbc; /** * @author zhangdd on 2022/2/10 */ public class IncorrectResultSetColumnCountException extends RuntimeException { private final int expectedCount; private final int actualCount; public IncorrectResultSetColumnCountException(int expectedCount, int actualCoun...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/IncorrectResultSetColumnCountException.java
Java
apache-2.0
513
package cn.bugstack.springframework.jdbc; /** * @author zhangdd on 2022/2/9 */ public class UncategorizedSQLException extends RuntimeException{ public UncategorizedSQLException(String message) { super(message); } public UncategorizedSQLException(String task,String sql, Throwable cause) { ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/UncategorizedSQLException.java
Java
apache-2.0
350
package cn.bugstack.springframework.jdbc.core; import java.sql.PreparedStatement; import java.sql.SQLException; /** * @author zhangdd on 2022/2/12 */ public class ArgumentPreparedStatementSetter implements PreparedStatementSetter { private final Object[] args; public ArgumentPreparedStatementSetter(Object...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/ArgumentPreparedStatementSetter.java
Java
apache-2.0
607
package cn.bugstack.springframework.jdbc.core; import cn.bugstack.springframework.jdbc.support.JdbcUtils; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.LinkedHashMap; import java.util.Map; /** * 对sql的行数据 进行逐列获取放到map里 * * @author zhangdd on 2022/2/10 ...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/ColumnMapRowMapper.java
Java
apache-2.0
1,347
package cn.bugstack.springframework.jdbc.core; import java.util.List; import java.util.Map; /** * @author zhangdd on 2022/2/9 */ public interface JdbcOperations { <T> T execute(StatementCallback<T> action); void execute(String sql); //------------------------------------------------------------------...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/JdbcOperations.java
Java
apache-2.0
2,022
package cn.bugstack.springframework.jdbc.core; import java.sql.PreparedStatement; import java.sql.SQLException; /** * @author zhangdd on 2022/2/12 */ public interface PreparedStatementCallback<T> { T doInPreparedStatement(PreparedStatement ps) throws SQLException; }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/PreparedStatementCallback.java
Java
apache-2.0
276
package cn.bugstack.springframework.jdbc.core; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; /** * @author zhangdd on 2022/2/12 */ public interface PreparedStatementCreator { PreparedStatement createPreparedStatement(Connection con) throws SQLException; }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/PreparedStatementCreator.java
Java
apache-2.0
312
package cn.bugstack.springframework.jdbc.core; import java.sql.PreparedStatement; import java.sql.SQLException; /** * @author zhangdd on 2022/2/12 */ public interface PreparedStatementSetter { void setValues(PreparedStatement ps) throws SQLException; }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/PreparedStatementSetter.java
Java
apache-2.0
262
package cn.bugstack.springframework.jdbc.core; import java.sql.ResultSet; import java.sql.SQLException; /** * @author zhangdd on 2022/2/10 */ public interface ResultSetExtractor<T> { T extractData(ResultSet rs) throws SQLException; }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/ResultSetExtractor.java
Java
apache-2.0
243
package cn.bugstack.springframework.jdbc.core; import java.sql.ResultSet; import java.sql.SQLException; /** * sql行转换 * * @author zhangdd on 2022/2/10 */ public interface RowMapper<T> { T mapRow(ResultSet rs, int rowNum) throws SQLException; }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/RowMapper.java
Java
apache-2.0
261
package cn.bugstack.springframework.jdbc.core; import cn.hutool.core.lang.Assert; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; /** * 将查询结果的ResultSet逐行的进行转换提取,转换成map,放到list里 * * @author zhangdd on 2022/2/10 */ public class RowMapperResultSetExtractor<...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/RowMapperResultSetExtractor.java
Java
apache-2.0
1,163
package cn.bugstack.springframework.jdbc.core; import cn.bugstack.springframework.jdbc.IncorrectResultSetColumnCountException; import cn.bugstack.springframework.jdbc.support.JdbcUtils; import cn.bugstack.springframework.util.NumberUtils; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/SingleColumnRowMapper.java
Java
apache-2.0
3,040
package cn.bugstack.springframework.jdbc.core; /** * @author zhangdd on 2022/2/9 */ public interface SqlProvider { String getSql(); }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/SqlProvider.java
Java
apache-2.0
142
package cn.bugstack.springframework.jdbc.core; import java.sql.SQLException; import java.sql.Statement; /** * @author zhangdd on 2022/2/9 */ public interface StatementCallback<T> { T doInStatement(Statement statement) throws SQLException; }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/core/StatementCallback.java
Java
apache-2.0
250
package cn.bugstack.springframework.jdbc.datasource; import java.sql.Connection; /** * @author zhangdd on 2022/2/9 */ public interface ConnectionHandler { Connection getConnection(); default void releaseConnection(Connection con) { } }
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/datasource/ConnectionHandler.java
Java
apache-2.0
256
package cn.bugstack.springframework.jdbc.datasource; import cn.hutool.core.lang.Assert; import java.sql.Connection; /** * @author zhangdd on 2022/2/9 */ public class ConnectionHolder { private ConnectionHandler connectionHandler; private Connection currentConnection; public ConnectionHolder(Connec...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/datasource/ConnectionHolder.java
Java
apache-2.0
1,535
package cn.bugstack.springframework.jdbc.datasource; import cn.bugstack.springframework.jdbc.CannotGetJdbcConnectionException; import javax.sql.DataSource; import java.sql.Connection; import java.sql.SQLException; /** * @author zhangdd on 2022/2/9 */ public abstract class DataSourceUtils { public static Con...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/datasource/DataSourceUtils.java
Java
apache-2.0
1,880
package cn.bugstack.springframework.jdbc.datasource; import cn.hutool.core.lang.Assert; import java.sql.Connection; /** * @author zhangdd on 2022/2/9 */ public class SimpleConnectionHandler implements ConnectionHandler { private final Connection connection; public SimpleConnectionHandler(Connection conne...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/datasource/SimpleConnectionHandler.java
Java
apache-2.0
536
package cn.bugstack.springframework.jdbc.support; import cn.bugstack.springframework.beans.factory.InitializingBean; import javax.sql.DataSource; /** * @author zhangdd on 2022/2/9 */ public abstract class JdbcAccessor implements InitializingBean { private DataSource dataSource; public DataSource getDat...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/support/JdbcAccessor.java
Java
apache-2.0
746
package cn.bugstack.springframework.jdbc.support; import cn.bugstack.springframework.jdbc.UncategorizedSQLException; import cn.bugstack.springframework.jdbc.core.*; import cn.bugstack.springframework.jdbc.datasource.DataSourceUtils; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/support/JdbcTemplate.java
Java
apache-2.0
9,707
package cn.bugstack.springframework.jdbc.support; //import com.sun.org.slf4j.internal.Logger; //import com.sun.org.slf4j.internal.LoggerFactory; import cn.bugstack.springframework.util.NumberUtils; import cn.hutool.core.util.StrUtil; import java.math.BigDecimal; import java.sql.*; /** * @author zhangdd on 2022/2/9...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/jdbc/support/JdbcUtils.java
Java
apache-2.0
5,249
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-18/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-18/src/main/java/cn/bugstack/springframework/util/ClassUtils.java
Java
apache-2.0
1,188
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-18/src/main/java/cn/bugstack/springframework/util/NumberUtils.java
Java
apache-2.0
13,148
package cn.bugstack.springframework.util; /** * Simple strategy interface for resolving a String value. * Used by {@link cn.bugstack.springframework.beans.factory.config.ConfigurableBeanFactory}. * <p> * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习;...
2302_77879529/spring
small-spring-step-18/src/main/java/cn/bugstack/springframework/util/StringValueResolver.java
Java
apache-2.0
569
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-19/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-19/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-19/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-19/src/main/java/cn/bugstack/springframework/aop/ClassFilter.java
Java
apache-2.0
755
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-19/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-19/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-19/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-19/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-19/src/main/java/cn/bugstack/springframework/aop/TargetSource.java
Java
apache-2.0
1,657
package cn.bugstack.springframework.aop; /** * @author zhangdd on 2022/2/27 */ public class TrueClassFilter implements ClassFilter { public static final TrueClassFilter INSTANCE = new TrueClassFilter(); private TrueClassFilter() { } @Override public boolean matches(Class<?> clazz) { r...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/aop/TrueClassFilter.java
Java
apache-2.0
494
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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/src/main/java/cn/bugstack/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java
Java
apache-2.0
4,197
package cn.bugstack.springframework.aop.support; import cn.bugstack.springframework.beans.factory.BeanFactory; import cn.bugstack.springframework.beans.factory.BeanFactoryAware; import cn.hutool.core.lang.Assert; import org.aopalliance.aop.Advice; /** * @author zhangdd on 2022/2/27 */ public abstract class Abstract...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/aop/support/AbstractBeanFactoryPointcutAdvisor.java
Java
apache-2.0
1,827
package cn.bugstack.springframework.aop.support; import cn.bugstack.springframework.aop.PointcutAdvisor; import java.io.Serializable; /** * @author zhangdd on 2022/2/27 */ public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Serializable { }
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/aop/support/AbstractPointcutAdvisor.java
Java
apache-2.0
271
package cn.bugstack.springframework.aop.support; import cn.bugstack.springframework.aop.MethodMatcher; import java.lang.reflect.Method; /** * @author zhangdd on 2022/2/27 */ public abstract class StaticMethodMatcher implements MethodMatcher { @Override public boolean matches(Method method, Class<?> clazz...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/aop/support/StaticMethodMatcher.java
Java
apache-2.0
412
package cn.bugstack.springframework.aop.support; import cn.bugstack.springframework.aop.ClassFilter; import cn.bugstack.springframework.aop.MethodMatcher; import cn.bugstack.springframework.aop.Pointcut; /** * @author zhangdd on 2022/2/27 */ public abstract class StaticMethodMatcherPointcut extends StaticMethodMat...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/aop/support/StaticMethodMatcherPointcut.java
Java
apache-2.0
676
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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/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-19/src/main/java/cn/bugstack/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java
Java
apache-2.0
4,021