diff --git a/src/main/java/org/mybatis/logging/Logger.java b/src/main/java/org/mybatis/logging/Logger.java index 75c98d5e2a..d1b57df919 100644 --- a/src/main/java/org/mybatis/logging/Logger.java +++ b/src/main/java/org/mybatis/logging/Logger.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,30 +26,69 @@ */ public class Logger { + /** The log. */ private final Log log; + /** + * Instantiates a new logger. + * + * @param log + * the log + */ Logger(Log log) { this.log = log; } + /** + * Error. + * + * @param s + * the s + * @param e + * the e + */ public void error(Supplier s, Throwable e) { log.error(s.get(), e); } + /** + * Error. + * + * @param s + * the s + */ public void error(Supplier s) { log.error(s.get()); } + /** + * Warn. + * + * @param s + * the s + */ public void warn(Supplier s) { log.warn(s.get()); } + /** + * Debug. + * + * @param s + * the s + */ public void debug(Supplier s) { if (log.isDebugEnabled()) { log.debug(s.get()); } } + /** + * Trace. + * + * @param s + * the s + */ public void trace(Supplier s) { if (log.isTraceEnabled()) { log.trace(s.get()); diff --git a/src/main/java/org/mybatis/logging/LoggerFactory.java b/src/main/java/org/mybatis/logging/LoggerFactory.java index 33a35a4cd0..dca5433077 100644 --- a/src/main/java/org/mybatis/logging/LoggerFactory.java +++ b/src/main/java/org/mybatis/logging/LoggerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,14 +24,33 @@ */ public class LoggerFactory { + /** + * Instantiates a new logger factory. + */ private LoggerFactory() { // NOP } + /** + * Gets the logger. + * + * @param aClass + * the a class + * + * @return the logger + */ public static Logger getLogger(Class aClass) { return new Logger(LogFactory.getLog(aClass)); } + /** + * Gets the logger. + * + * @param logger + * the logger + * + * @return the logger + */ public static Logger getLogger(String logger) { return new Logger(LogFactory.getLog(logger)); } diff --git a/src/main/java/org/mybatis/spring/MyBatisSystemException.java b/src/main/java/org/mybatis/spring/MyBatisSystemException.java index a40d25c4a6..ee071a3f08 100644 --- a/src/main/java/org/mybatis/spring/MyBatisSystemException.java +++ b/src/main/java/org/mybatis/spring/MyBatisSystemException.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2023 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,11 +31,27 @@ public class MyBatisSystemException extends UncategorizedDataAccessException { private static final long serialVersionUID = -5284728621670758939L; + /** + * Instantiates a new my batis system exception. + * + * @param cause + * the cause + * + * @deprecated as of 3.0.4, use {@link #MyBatisSystemException(String, Throwable)} instead + */ @Deprecated(since = "3.0.4", forRemoval = true) public MyBatisSystemException(Throwable cause) { this(cause.getMessage(), cause); } + /** + * Instantiates a new my batis system exception. + * + * @param msg + * the msg + * @param cause + * the cause + */ public MyBatisSystemException(String msg, Throwable cause) { super(msg, cause); } diff --git a/src/main/java/org/mybatis/spring/SqlSessionHolder.java b/src/main/java/org/mybatis/spring/SqlSessionHolder.java index df2ffbf603..91d4b07573 100644 --- a/src/main/java/org/mybatis/spring/SqlSessionHolder.java +++ b/src/main/java/org/mybatis/spring/SqlSessionHolder.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,14 +59,29 @@ public SqlSessionHolder(SqlSession sqlSession, ExecutorType executorType, this.exceptionTranslator = exceptionTranslator; } + /** + * Gets the sql session. + * + * @return the sql session + */ public SqlSession getSqlSession() { return sqlSession; } + /** + * Gets the executor type. + * + * @return the executor type + */ public ExecutorType getExecutorType() { return executorType; } + /** + * Gets the persistence exception translator. + * + * @return the persistence exception translator + */ public PersistenceExceptionTranslator getPersistenceExceptionTranslator() { return exceptionTranslator; } diff --git a/src/main/java/org/mybatis/spring/SqlSessionTemplate.java b/src/main/java/org/mybatis/spring/SqlSessionTemplate.java index ca1a6405b5..d1b22c0e7f 100644 --- a/src/main/java/org/mybatis/spring/SqlSessionTemplate.java +++ b/src/main/java/org/mybatis/spring/SqlSessionTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -132,14 +132,29 @@ public SqlSessionTemplate(SqlSessionFactory sqlSessionFactory, ExecutorType exec new Class[] { SqlSession.class }, new SqlSessionInterceptor()); } + /** + * Gets the sql session factory. + * + * @return the sql session factory + */ public SqlSessionFactory getSqlSessionFactory() { return this.sqlSessionFactory; } + /** + * Gets the executor type. + * + * @return the executor type + */ public ExecutorType getExecutorType() { return this.executorType; } + /** + * Gets the persistence exception translator. + * + * @return the persistence exception translator + */ public PersistenceExceptionTranslator getPersistenceExceptionTranslator() { return this.exceptionTranslator; } diff --git a/src/main/java/org/mybatis/spring/annotation/MapperScan.java b/src/main/java/org/mybatis/spring/annotation/MapperScan.java index e6e244ed2d..93133ffdb2 100644 --- a/src/main/java/org/mybatis/spring/annotation/MapperScan.java +++ b/src/main/java/org/mybatis/spring/annotation/MapperScan.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,6 @@ * the class that declares this annotation. *

* Configuration example: - *

* *
  * @Configuration
@@ -168,7 +167,6 @@
    * Whether enable lazy initialization of mapper bean.
    * 

* Default is {@code false}. - *

* * @return set {@code true} to enable lazy initialization * @@ -180,7 +178,6 @@ * Specifies the default scope of scanned mappers. *

* Default is {@code ""} (equiv to singleton). - *

* * @return the default scope */ diff --git a/src/main/java/org/mybatis/spring/annotation/MapperScans.java b/src/main/java/org/mybatis/spring/annotation/MapperScans.java index 2eddbe3c00..989f1b2d97 100644 --- a/src/main/java/org/mybatis/spring/annotation/MapperScans.java +++ b/src/main/java/org/mybatis/spring/annotation/MapperScans.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,5 +41,11 @@ @Documented @Import(MapperScannerRegistrar.RepeatingRegistrar.class) public @interface MapperScans { + + /** + * Value. + * + * @return the mapper scan[] + */ MapperScan[] value(); } diff --git a/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java b/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java index 0015db9bd9..28589a167f 100644 --- a/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java +++ b/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java @@ -47,6 +47,9 @@ * * @author Eduardo Macarron * + * @param + * the generic type + * * @since 1.1.0 */ public class MyBatisBatchItemWriter implements ItemWriter, InitializingBean { diff --git a/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java b/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java index 520463ede7..6498c60983 100644 --- a/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java +++ b/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java @@ -32,7 +32,12 @@ import org.springframework.beans.factory.InitializingBean; /** + * {@code ItemReader} that uses MyBatis Cursor to read data. + * * @author Guillaume Darmont / guillaume@dropinocean.com + * + * @param + * the generic type */ public class MyBatisCursorItemReader extends AbstractItemCountingItemStreamItemReader implements InitializingBean { @@ -48,6 +53,9 @@ public class MyBatisCursorItemReader extends AbstractItemCountingItemStreamIt private Cursor cursor; private Iterator cursorIterator; + /** + * Instantiates a new my batis cursor item reader. + */ public MyBatisCursorItemReader() { setName(getShortName(MyBatisCursorItemReader.class)); } diff --git a/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java b/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java index 1ef247a6ba..a8baed03a6 100644 --- a/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java +++ b/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java @@ -31,12 +31,16 @@ import org.springframework.batch.infrastructure.item.database.AbstractPagingItemReader; /** - * {@code org.springframework.batch.item.ItemReader} for reading database records using MyBatis in a paging fashion. + * {@code org.springframework.batch.infrastructure.item.ItemReader} for reading database records using MyBatis in a + * paging fashion. *

* Provided to facilitate the migration from Spring-Batch iBATIS 2 page item readers to MyBatis 3. * * @author Eduardo Macarron * + * @param + * the generic type + * * @since 1.1.0 */ public class MyBatisPagingItemReader extends AbstractPagingItemReader { @@ -51,6 +55,9 @@ public class MyBatisPagingItemReader extends AbstractPagingItemReader { private Supplier> parameterValuesSupplier; + /** + * Instantiates a new my batis paging item reader. + */ public MyBatisPagingItemReader() { setName(getShortName(MyBatisPagingItemReader.class)); } diff --git a/src/main/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilder.java b/src/main/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilder.java index 6270175fb4..a55c34da15 100644 --- a/src/main/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilder.java +++ b/src/main/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,9 @@ * * @author Kazuki Shimizu * + * @param + * the generic type + * * @since 2.0.0 * * @see MyBatisBatchItemWriter diff --git a/src/main/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilder.java b/src/main/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilder.java index 11d0eec554..93e21d4548 100644 --- a/src/main/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilder.java +++ b/src/main/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,9 @@ * * @author Kazuki Shimizu * + * @param + * the generic type + * * @since 2.0.0 * * @see MyBatisCursorItemReader @@ -104,15 +107,15 @@ public MyBatisCursorItemReaderBuilder parameterValuesSupplier( } /** - * Configure if the state of the {@link org.springframework.batch.item.ItemStreamSupport} should be persisted within - * the {@link org.springframework.batch.item.ExecutionContext} for restart purposes. + * Configure if the state of the {@link org.springframework.batch.infrastructure.item.ItemStreamSupport} should be + * persisted within the {@link org.springframework.batch.infrastructure.item.ExecutionContext} for restart purposes. * * @param saveState * defaults to true * * @return The current instance of the builder. * - * @see org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader#setSaveState(boolean) + * @see org.springframework.batch.infrastructure.item.support.AbstractItemCountingItemStreamItemReader#setSaveState(boolean) */ public MyBatisCursorItemReaderBuilder saveState(boolean saveState) { this.saveState = saveState; @@ -127,7 +130,7 @@ public MyBatisCursorItemReaderBuilder saveState(boolean saveState) { * * @return The current instance of the builder. * - * @see org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader#setMaxItemCount(int) + * @see org.springframework.batch.infrastructure.item.support.AbstractItemCountingItemStreamItemReader#setMaxItemCount(int) */ public MyBatisCursorItemReaderBuilder maxItemCount(int maxItemCount) { this.maxItemCount = maxItemCount; diff --git a/src/main/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilder.java b/src/main/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilder.java index e4504b6559..cf710a10a8 100644 --- a/src/main/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilder.java +++ b/src/main/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,9 +27,12 @@ * * @author Kazuki Shimizu * - * @since 2.0.0 + * @param + * the generic type * * @see MyBatisPagingItemReader + * + * @since 2.0.0 */ public class MyBatisPagingItemReaderBuilder { @@ -112,7 +115,7 @@ public MyBatisPagingItemReaderBuilder parameterValuesSupplier( * * @return this instance for method chaining * - * @see org.springframework.batch.item.database.AbstractPagingItemReader#setPageSize(int) + * @see org.springframework.batch.infrastructure.item.database.AbstractPagingItemReader#setPageSize(int) */ public MyBatisPagingItemReaderBuilder pageSize(int pageSize) { this.pageSize = pageSize; @@ -120,15 +123,15 @@ public MyBatisPagingItemReaderBuilder pageSize(int pageSize) { } /** - * Configure if the state of the {@link org.springframework.batch.item.ItemStreamSupport} should be persisted within - * the {@link org.springframework.batch.item.ExecutionContext} for restart purposes. + * Configure if the state of the {@link org.springframework.batch.infrastructure.item.ItemStreamSupport} should be + * persisted within the {@link org.springframework.batch.infrastructure.item.ExecutionContext} for restart purposes. * * @param saveState * defaults to true * * @return The current instance of the builder. * - * @see org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader#setSaveState(boolean) + * @see org.springframework.batch.infrastructure.item.support.AbstractItemCountingItemStreamItemReader#setSaveState(boolean) */ public MyBatisPagingItemReaderBuilder saveState(boolean saveState) { this.saveState = saveState; @@ -143,7 +146,7 @@ public MyBatisPagingItemReaderBuilder saveState(boolean saveState) { * * @return The current instance of the builder. * - * @see org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader#setMaxItemCount(int) + * @see org.springframework.batch.infrastructure.item.support.AbstractItemCountingItemStreamItemReader#setMaxItemCount(int) */ public MyBatisPagingItemReaderBuilder maxItemCount(int maxItemCount) { this.maxItemCount = maxItemCount; diff --git a/src/main/java/org/mybatis/spring/batch/builder/package-info.java b/src/main/java/org/mybatis/spring/batch/builder/package-info.java index 9420c603a2..59758649c5 100644 --- a/src/main/java/org/mybatis/spring/batch/builder/package-info.java +++ b/src/main/java/org/mybatis/spring/batch/builder/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,8 @@ * limitations under the License. */ /** - * Contains classes to builder classes for {@link org.springframework.batch.item.ItemReader} and - * {@link org.springframework.batch.item.ItemWriter}. + * Contains classes to builder classes for {@link org.springframework.batch.infrastructure.item.ItemReader} and + * {@link org.springframework.batch.infrastructure.item.ItemWriter}. * * @since 2.0.0 */ diff --git a/src/main/java/org/mybatis/spring/mapper/ClassPathMapperScanner.java b/src/main/java/org/mybatis/spring/mapper/ClassPathMapperScanner.java index 62955111e1..3ce01d9248 100644 --- a/src/main/java/org/mybatis/spring/mapper/ClassPathMapperScanner.java +++ b/src/main/java/org/mybatis/spring/mapper/ClassPathMapperScanner.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -90,6 +90,14 @@ public class ClassPathMapperScanner extends ClassPathBeanDefinitionScanner { private String defaultScope; private List excludeFilters; + /** + * Instantiates a new class path mapper scanner. + * + * @param registry + * the registry + * @param environment + * the environment + */ public ClassPathMapperScanner(BeanDefinitionRegistry registry, Environment environment) { super(registry, false, environment); setIncludeAnnotationConfig(!AotDetector.useGeneratedArtifacts()); @@ -97,6 +105,11 @@ public ClassPathMapperScanner(BeanDefinitionRegistry registry, Environment envir } /** + * Instantiates a new class path mapper scanner. + * + * @param registry + * the registry + * * @deprecated Please use the {@link #ClassPathMapperScanner(BeanDefinitionRegistry, Environment)}. */ @Deprecated(since = "3.0.4", forRemoval = true) @@ -106,10 +119,22 @@ public ClassPathMapperScanner(BeanDefinitionRegistry registry) { setPrintWarnLogIfNotFoundMappers(!NativeDetector.inNativeImage()); } + /** + * Sets the adds the to config. + * + * @param addToConfig + * the new adds the to config + */ public void setAddToConfig(boolean addToConfig) { this.addToConfig = addToConfig; } + /** + * Sets the annotation class. + * + * @param annotationClass + * the new annotation class + */ public void setAnnotationClass(Class annotationClass) { this.annotationClass = annotationClass; } @@ -118,7 +143,6 @@ public void setAnnotationClass(Class annotationClass) { * Set whether enable lazy initialization for mapper bean. *

* Default is {@code false}. - *

* * @param lazyInitialization * Set the @{code true} to enable @@ -133,7 +157,6 @@ public void setLazyInitialization(boolean lazyInitialization) { * Set whether print warning log if not found mappers that matches conditions. *

* Default is {@code true}. But {@code false} when running in native image. - *

* * @param printWarnLogIfNotFoundMappers * Set the @{code true} to print @@ -144,34 +167,75 @@ public void setPrintWarnLogIfNotFoundMappers(boolean printWarnLogIfNotFoundMappe this.printWarnLogIfNotFoundMappers = printWarnLogIfNotFoundMappers; } + /** + * Sets the marker interface. + * + * @param markerInterface + * the new marker interface + */ public void setMarkerInterface(Class markerInterface) { this.markerInterface = markerInterface; } + /** + * Sets the exclude filters. + * + * @param excludeFilters + * the new exclude filters + */ public void setExcludeFilters(List excludeFilters) { this.excludeFilters = excludeFilters; } + /** + * Sets the sql session factory. + * + * @param sqlSessionFactory + * the new sql session factory + */ public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) { this.sqlSessionFactory = sqlSessionFactory; } + /** + * Sets the sql session template. + * + * @param sqlSessionTemplate + * the new sql session template + */ public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) { this.sqlSessionTemplate = sqlSessionTemplate; } + /** + * Sets the sql session template bean name. + * + * @param sqlSessionTemplateBeanName + * the new sql session template bean name + */ public void setSqlSessionTemplateBeanName(String sqlSessionTemplateBeanName) { this.sqlSessionTemplateBeanName = sqlSessionTemplateBeanName; } + /** + * Sets the sql session factory bean name. + * + * @param sqlSessionFactoryBeanName + * the new sql session factory bean name + */ public void setSqlSessionFactoryBeanName(String sqlSessionFactoryBeanName) { this.sqlSessionFactoryBeanName = sqlSessionFactoryBeanName; } /** + * Sets the mapper factory bean. + * + * @param mapperFactoryBean + * the new mapper factory bean + * * @deprecated Since 2.0.1, Please use the {@link #setMapperFactoryBeanClass(Class)}. */ - @Deprecated + @Deprecated(since = "2.0.1", forRemoval = true) public void setMapperFactoryBean(MapperFactoryBean mapperFactoryBean) { this.mapperFactoryBeanClass = mapperFactoryBean == null ? MapperFactoryBean.class : mapperFactoryBean.getClass(); } @@ -192,7 +256,6 @@ public void setMapperFactoryBeanClass(Class mapperF * Set the default scope of scanned mappers. *

* Default is {@code null} (equiv to singleton). - *

* * @param defaultScope * the scope diff --git a/src/main/java/org/mybatis/spring/mapper/MapperFactoryBean.java b/src/main/java/org/mybatis/spring/mapper/MapperFactoryBean.java index f95b721314..66132589f2 100644 --- a/src/main/java/org/mybatis/spring/mapper/MapperFactoryBean.java +++ b/src/main/java/org/mybatis/spring/mapper/MapperFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,9 @@ * * @author Eduardo Macarron * + * @param + * the generic type + * * @see SqlSessionTemplate */ public class MapperFactoryBean extends SqlSessionDaoSupport implements FactoryBean { @@ -56,10 +59,19 @@ public class MapperFactoryBean extends SqlSessionDaoSupport implements Factor private boolean addToConfig = true; + /** + * Instantiates a new mapper factory bean. + */ public MapperFactoryBean() { // intentionally empty } + /** + * Instantiates a new mapper factory bean. + * + * @param mapperInterface + * the mapper interface + */ public MapperFactoryBean(Class mapperInterface) { this.mapperInterface = mapperInterface; } diff --git a/src/main/java/org/mybatis/spring/mapper/MapperScannerConfigurer.java b/src/main/java/org/mybatis/spring/mapper/MapperScannerConfigurer.java index f220ce4dee..211e3c1fa9 100644 --- a/src/main/java/org/mybatis/spring/mapper/MapperScannerConfigurer.java +++ b/src/main/java/org/mybatis/spring/mapper/MapperScannerConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -164,7 +164,6 @@ public void setAddToConfig(boolean addToConfig) { * Set whether enable lazy initialization for mapper bean. *

* Default is {@code false}. - *

* * @param lazyInitialization * Set the @{code true} to enable @@ -235,7 +234,6 @@ public void setRawExcludeFilters(List> rawExcludeFilters) { /** * Specifies which {@code SqlSessionTemplate} to use in the case that there is more than one in the spring context. * Usually this is only needed when you have more than one datasource. - *

* * @deprecated Use {@link #setSqlSessionTemplateBeanName(String)} instead * @@ -266,7 +264,6 @@ public void setSqlSessionTemplateBeanName(String sqlSessionTemplateName) { /** * Specifies which {@code SqlSessionFactory} to use in the case that there is more than one in the spring context. * Usually this is only needed when you have more than one datasource. - *

* * @deprecated Use {@link #setSqlSessionFactoryBeanName(String)} instead. * @@ -357,7 +354,6 @@ public void setNameGenerator(BeanNameGenerator nameGenerator) { * Sets the default scope of scanned mappers. *

* Default is {@code null} (equiv to singleton). - *

* * @param defaultScope * the default scope diff --git a/src/main/java/org/mybatis/spring/support/SqlSessionDaoSupport.java b/src/main/java/org/mybatis/spring/support/SqlSessionDaoSupport.java index 0eeeab17c6..ed6573932b 100644 --- a/src/main/java/org/mybatis/spring/support/SqlSessionDaoSupport.java +++ b/src/main/java/org/mybatis/spring/support/SqlSessionDaoSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ * be used to execute SQL methods. *

* This class needs a SqlSessionTemplate or a SqlSessionFactory. If both are set the SqlSessionFactory will be ignored. - *

* * @author Putthiphong Boonphong * @author Eduardo Macarron diff --git a/src/main/java/org/mybatis/spring/transaction/SpringManagedTransaction.java b/src/main/java/org/mybatis/spring/transaction/SpringManagedTransaction.java index 1b6cd04832..4b3eefc683 100644 --- a/src/main/java/org/mybatis/spring/transaction/SpringManagedTransaction.java +++ b/src/main/java/org/mybatis/spring/transaction/SpringManagedTransaction.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,6 +53,12 @@ public class SpringManagedTransaction implements Transaction { private boolean autoCommit; + /** + * Instantiates a new spring managed transaction. + * + * @param dataSource + * the data source + */ public SpringManagedTransaction(DataSource dataSource) { notNull(dataSource, "No DataSource specified"); this.dataSource = dataSource; diff --git a/src/site/es/markdown/batch.md b/src/site/es/markdown/batch.md index 1578477f98..76ba12b0c7 100644 --- a/src/site/es/markdown/batch.md +++ b/src/site/es/markdown/batch.md @@ -271,7 +271,7 @@ Entonces en la configuración de spring habrá un `CompositeItemWriter` que usar Fijate que el *InteractionMetadata* es una asociacióin en el ejemplo por lo que debe ser escrita antes para que la Interaction pueda recibir la clave generada. ```xml - + diff --git a/src/site/ja/markdown/batch.md b/src/site/ja/markdown/batch.md index 0c0d55257e..9c0fcd60af 100644 --- a/src/site/ja/markdown/batch.md +++ b/src/site/ja/markdown/batch.md @@ -267,7 +267,7 @@ public class Interaction { この例では *Interaction* をアップデートするためのキーを取得するため、*InteractionMetadata* を先に書き込む必要があります。 ```xml - + diff --git a/src/site/ko/markdown/batch.md b/src/site/ko/markdown/batch.md index cdcd9d0b5b..26911daef1 100644 --- a/src/site/ko/markdown/batch.md +++ b/src/site/ko/markdown/batch.md @@ -274,7 +274,7 @@ public class Interaction { 그리고 스프링 설정에는 각각의 레코드를 처리하기 위해 특별히 설정된 전용(delegates) writer를 사용하는 `CompositeItemWriter`가 있다. ```xml - + diff --git a/src/site/markdown/batch.md b/src/site/markdown/batch.md index a6ad50418c..aba658ef21 100644 --- a/src/site/markdown/batch.md +++ b/src/site/markdown/batch.md @@ -280,7 +280,7 @@ Then in the spring configuration there will be a `CompositeItemWriter` that will Note that as the *InteractionMetadata* is an association in the example it will need to be written first so that Interaction can have the updated key. ```xml - + diff --git a/src/site/zh_CN/markdown/batch.md b/src/site/zh_CN/markdown/batch.md index 891ed531cb..5d891fe154 100644 --- a/src/site/zh_CN/markdown/batch.md +++ b/src/site/zh_CN/markdown/batch.md @@ -264,7 +264,7 @@ public class Interaction { 在 Spring 配置中要配置一个 `CompositeItemWriter`,它将会将写入操作委托到特定种类的 writer 上面去。注意 *InteractionMetadata* 在例子里面是一个关联,它需要首先被写入,这样 Interaction 才能获得更新之后的键。 ```xml - +