fix for caching library autoconfiguration (#19849)

> Pull Request Template
>
> Use this template to quickly create a well written pull request.
Delete all quotes before creating the pull request.

## Description
Spring Boot 2.7 introduced a new
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
file for registering auto-configurations, while maintaining backwards
compatibility with registration in spring.factories. With this release,
support for registering auto-configurations in spring.factories has been
removed in favor of the imports file.
> Please include a summary of the changes and which issue has been
fixed. Please also include relevant motivation
> and context. List any dependencies that are required for this change
> Links to Notion, Figma or any other documents that might be relevant
to the PR

> Add a TL;DR when description is extra long (helps content team)

Fixes # (issue)
> if no issue exists, please create an issue and ask the maintainers
about this first


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video


## Type of change

> Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide
instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
> Delete anything that is not important

- Manual
- Jest
- Cypress

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
This commit is contained in:
sidhantgoel 2023-01-17 22:18:42 +05:30 committed by GitHub
parent 6bef496dad
commit b73d41929d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 14 additions and 15 deletions

View File

@ -1,2 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.appsmith.caching.CachingConfig

View File

@ -1,4 +1,4 @@
package com.appsmith.caching;
package com.appsmith.testcaching;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package com.appsmith.caching.configuration;
package com.appsmith.testcaching.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package com.appsmith.caching.model;
package com.appsmith.testcaching.model;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.appsmith.caching.model;
package com.appsmith.testcaching.model;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,4 +1,4 @@
package com.appsmith.caching.model;
package com.appsmith.testcaching.model;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -1,4 +1,4 @@
package com.appsmith.caching.model;
package com.appsmith.testcaching.model;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.appsmith.caching.service;
package com.appsmith.testcaching.service;
import java.time.Duration;
import java.util.ArrayList;
@ -7,9 +7,9 @@ import java.util.List;
import org.springframework.stereotype.Service;
import com.appsmith.caching.annotations.CacheEvict;
import com.appsmith.testcaching.model.ArgumentModel;
import com.appsmith.testcaching.model.TestModel;
import com.appsmith.caching.annotations.Cache;
import com.appsmith.caching.model.ArgumentModel;
import com.appsmith.caching.model.TestModel;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

View File

@ -1,4 +1,4 @@
package com.appsmith.caching.test;
package com.appsmith.testcaching.test;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ -13,9 +13,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.appsmith.caching.components.CacheManager;
import com.appsmith.caching.model.ArgumentModel;
import com.appsmith.caching.model.TestModel;
import com.appsmith.caching.service.CacheTestService;
import com.appsmith.testcaching.model.ArgumentModel;
import com.appsmith.testcaching.model.TestModel;
import com.appsmith.testcaching.service.CacheTestService;
import lombok.extern.slf4j.Slf4j;