-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
127 changed files
with
446 additions
and
745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2022 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.annotation; | ||
|
@@ -47,6 +44,7 @@ | |
* @author Costin Leau | ||
* @author Juergen Hoeller | ||
* @author Stephane Nicoll | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
@SuppressWarnings("serial") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2022 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.annotation; | ||
|
@@ -38,6 +35,7 @@ | |
* | ||
* @author Chris Beams | ||
* @author Stephane Nicoll | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @see EnableCaching | ||
* @see ProxyCachingConfiguration | ||
* @since 4.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2023 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.annotation; | ||
|
@@ -47,6 +44,7 @@ | |
* @author Phillip Webb | ||
* @author Stephane Nicoll | ||
* @author Sam Brannen | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
@SuppressWarnings("serial") | ||
|
@@ -94,7 +92,7 @@ private Collection<CacheOperation> parseCacheAnnotations( | |
|
||
Collection<? extends Annotation> anns = | ||
localOnly ? AnnotatedElementUtils.getAllMergedAnnotations(ae, CACHE_OPERATION_ANNOTATIONS) | ||
: AnnotatedElementUtils.findAllMergedAnnotations(ae, CACHE_OPERATION_ANNOTATIONS); | ||
: AnnotatedElementUtils.findAllMergedAnnotations(ae, CACHE_OPERATION_ANNOTATIONS); | ||
if (anns.isEmpty()) { | ||
return null; | ||
} | ||
|
@@ -209,13 +207,13 @@ private void parseCachingAnnotation( | |
private void validateCacheOperation(AnnotatedElement ae, CacheOperation operation) { | ||
if (StringUtils.hasText(operation.getKey()) && StringUtils.hasText(operation.getKeyGenerator())) { | ||
throw new IllegalStateException("Invalid cache annotation configuration on '" + | ||
ae.toString() + "'. Both 'key' and 'keyGenerator' attributes have been set. " + | ||
ae + "'. Both 'key' and 'keyGenerator' attributes have been set. " + | ||
"These attributes are mutually exclusive: either set the EL expression used to" + | ||
"compute the key at runtime or set the name of the KeyGenerator bean to use."); | ||
} | ||
if (StringUtils.hasText(operation.getCacheManager()) && StringUtils.hasText(operation.getCacheResolver())) { | ||
throw new IllegalStateException("Invalid cache annotation configuration on '" + | ||
ae.toString() + "'. Both 'cacheManager' and 'cacheResolver' attributes have been set. " + | ||
ae + "'. Both 'cacheManager' and 'cacheResolver' attributes have been set. " + | ||
"These attributes are mutually exclusive: the cache manager is used to configure a" + | ||
"default cache resolver if none is set. If a cache resolver is set, the cache manager" + | ||
"won't be used."); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2022 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.concurrent; | ||
|
@@ -40,6 +37,7 @@ | |
* | ||
* @author Costin Leau | ||
* @author Juergen Hoeller | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
public class ConcurrentMapCacheFactoryBean | ||
|
@@ -91,7 +89,7 @@ public void setBeanName(String beanName) { | |
@Override | ||
public void afterPropertiesSet() { | ||
this.cache = (this.store != null ? new ConcurrentMapCache(this.name, this.store, this.allowNullValues) : | ||
new ConcurrentMapCache(this.name, this.allowNullValues)); | ||
new ConcurrentMapCache(this.name, this.allowNullValues)); | ||
} | ||
|
||
@Override | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © Harry Yang & 2017 - 2023 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.config; | ||
|
@@ -55,6 +52,7 @@ | |
* | ||
* @author Costin Leau | ||
* @author Stephane Nicoll | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
class AnnotationDrivenCacheBeanDefinitionParser implements BeanDefinitionParser { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © Harry Yang & 2017 - 2023 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.config; | ||
|
@@ -51,6 +48,7 @@ | |
* @author Costin Leau | ||
* @author Phillip Webb | ||
* @author Stephane Nicoll | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
*/ | ||
class CacheAdviceParser extends AbstractSingleBeanDefinitionParser { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2022 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.config; | ||
|
@@ -24,6 +21,7 @@ | |
* Configuration constants for internal sharing across subpackages. | ||
* | ||
* @author Juergen Hoeller | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
public abstract class CacheManagementConfigUtils { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2022 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.config; | ||
|
@@ -35,6 +32,7 @@ | |
* Framework cache management facilities. | ||
* | ||
* @author Costin Leau | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
public class CacheNamespaceHandler extends NamespaceHandlerSupport { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2022 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.interceptor; | ||
|
@@ -30,6 +27,7 @@ | |
* | ||
* @author Stephane Nicoll | ||
* @author Juergen Hoeller | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @see CacheErrorHandler | ||
* @since 4.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © TODAY & 2017 - 2022 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.interceptor; | ||
|
@@ -37,6 +34,7 @@ | |
* | ||
* @author Stephane Nicoll | ||
* @author Juergen Hoeller | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
public abstract class AbstractCacheResolver implements CacheResolver, InitializingBean { | ||
|
@@ -92,8 +90,7 @@ public Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext | |
for (String cacheName : cacheNames) { | ||
Cache cache = cacheManager.getCache(cacheName); | ||
if (cache == null) { | ||
throw new IllegalArgumentException("Cannot find cache named '" + | ||
cacheName + "' for " + context.getOperation()); | ||
throw new IllegalArgumentException("Cannot find cache named '%s' for %s".formatted(cacheName, context.getOperation())); | ||
} | ||
result.add(cache); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/* | ||
* Original Author -> Harry Yang ([email protected]) https://taketoday.cn | ||
* Copyright © Harry Yang & 2017 - 2023 All Rights Reserved. | ||
* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER | ||
* Copyright 2017 - 2024 the original author or authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -15,7 +12,7 @@ | |
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see [http://www.gnu.org/licenses/] | ||
* along with this program. If not, see [https://www.gnu.org/licenses/] | ||
*/ | ||
|
||
package cn.taketoday.cache.interceptor; | ||
|
@@ -31,6 +28,7 @@ | |
* cache advice bean for methods that are cacheable. | ||
* | ||
* @author Costin Leau | ||
* @author <a href="https://github.com/TAKETODAY">Harry Yang</a> | ||
* @since 4.0 | ||
*/ | ||
public class BeanFactoryCacheOperationSourceAdvisor extends AbstractBeanFactoryPointcutAdvisor { | ||
|
Oops, something went wrong.