Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename azure spring data cosmos to azure spring data cosmos core #13791

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

# PRLabel: %Cosmos
/sdk/cosmos/ @moderakh @kushagraThapar @David-Noble-at-work @kirankumarkolli @mbhaskar
/sdk/cosmos/azure-spring-data-cosmos/ @kushagraThapar @saragluna @yiliuTo @chenrujun @zhoufenqin @jialindai
/sdk/cosmos/azure-spring-data-cosmos-core/ @kushagraThapar @saragluna @yiliuTo @chenrujun @zhoufenqin @jialindai

# PRLabel: %Event Hubs
/sdk/eventhubs/ @conniey @srnagar @mssfang
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
<!-- Checkstyle suppressions for azure-spring AADB2C package name-->
<suppress checks="PackageName" files="com.microsoft.azure.spring.autoconfigure.*|com.azure.spring.*"/>

<!-- Checkstyle suppressions for azure-spring-data-cosmos package -->
<!-- Checkstyle suppressions for azure.spring.data.cosmos package -->
<suppress checks="com.azure.tools.checkstyle.checks.GoodLoggingCheck|ExternalDependencyExposedCheck|ThrowFromClientLoggerCheck" files="com.azure.spring.data.cosmos.*\.java"/>
<suppress checks="MethodName|MemberName|ParameterName|VisibilityModifier" files="com.azure.spring.data.cosmos.domain|repository|config.*\.java"/>
<suppress checks="ConstantName" files="com.azure.spring.data.cosmos.repository|common.*\.java" />
Expand Down
4 changes: 2 additions & 2 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} -->
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos-core;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ com.azure:azure-security-keyvault-certificates;4.0.4;4.1.0-beta.5
com.azure:azure-security-keyvault-keys;4.1.4;4.2.0-beta.6
com.azure:azure-security-keyvault-secrets;4.1.4;4.2.0-beta.5
com.azure:azure-sdk-template;1.1.0;1.2.0-beta.1
com.azure:azure-spring-data-cosmos;3.0.0-beta.1;3.0.0-beta.1
com.azure:azure-spring-data-cosmos-core;3.0.0-beta.1;3.0.0-beta.1
com.azure:azure-spring-data-2-2-cosmos;3.0.0-beta.1;3.0.0-beta.1
com.azure:azure-spring-data-2-3-cosmos;3.0.0-beta.1;3.0.0-beta.1
com.azure:azure-spring-data-test;3.0.0-beta.1;3.0.0-beta.1
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/azure-spring-data-2-2-cosmos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} -->
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos-core;current} -->
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/azure-spring-data-2-3-cosmos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} -->
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos-core;current} -->
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To build the project, run maven commands.

```bash
git clone https://github.com/Azure/azure-sdk-for-java.git
cd sdk/cosmos/azure-spring-data-cosmos
cd sdk/cosmos/azure-spring-data-cosmos-core
mvnw clean install
```

Expand All @@ -35,7 +35,7 @@ mvn clean install -Dgpg.skip

2. Set environment variables ACCOUNT_HOST, ACCOUNT_KEY and SECONDARY_ACCOUNT_KEY, where value of them are Cosmos account URI, primary key and secondary key.

`azure-spring-data-cosmos` also support multiple database configuration. So set the second group environment variables NEW_ACCOUNT_HOST, NEW_ACCOUNT_KEY and NEW_SECONDARY_ACCOUNT_KEY, the two group environment variables can be same.
`azure-spring-data-cosmos-core` also support multiple database configuration. So set the second group environment variables NEW_ACCOUNT_HOST, NEW_ACCOUNT_KEY and NEW_SECONDARY_ACCOUNT_KEY, the two group environment variables can be same.
3. Run maven command with `integration-test-azure` profile.

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ public class AuditableUser {
## Quick Start

### Add the dependency
`azure-spring-data-cosmos` is published on Maven Central Repository.
`azure-spring-data-cosmos-core` is published on Maven Central Repository.
If you are using Maven, add the following dependency.

[//]: # "{x-version-update-start;com.azure:azure-spring-data-cosmos;current}"
[//]: # "{x-version-update-start;com.azure:azure-spring-data-cosmos-core;current}"
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version>
</dependency>
```
Expand Down Expand Up @@ -367,14 +367,14 @@ public class SampleApplication implements CommandLineRunner {
Autowired UserRepository interface, then can do save, delete and find operations. Spring Data Azure Cosmos DB uses the CosmosTemplate to execute the queries behind *find*, *save* methods. You can use the template yourself for more complex queries.

## Support multi-database configuration
The `azure-spring-data-cosmos` support multi-database configuration, includes "multiple account" and "single account, multiple database". Here is an example.
The `azure-spring-data-cosmos-core` support multi-database configuration, includes "multiple account" and "single account, multiple database". Here is an example.

### Add the dependency
[//]: # "{x-version-update-start;com.azure:azure-spring-data-cosmos;current}"
[//]: # "{x-version-update-start;com.azure:azure-spring-data-cosmos-core;current}"
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version>
</dependency>
```
Expand All @@ -399,7 +399,7 @@ azure.cosmos.secondary.populateQueryMetrics=if-populate-query-metrics
```

### Define Entities and Repositories
The [Entity](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos#define-an-entity) and [Repository](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos#create-repositories) definition is similar as above.
The [Entity](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core#define-an-entity) and [Repository](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core#create-repositories) definition is similar as above.
You can put different database entities into different packages.

### Setup configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
</parent>

<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} -->
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos-core;current} -->
<packaging>jar</packaging>
<name>Spring Data for Azure Cosmos DB SQL API</name>
<description>Spring Data for Azure Cosmos DB SQL API</description>
<url>https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos</url>
<url>https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core</url>

<properties>
<maven.build.timestamp.format>MM-dd-HH-mm-ss</maven.build.timestamp.format>
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/azure-spring-data-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} -->
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos-core;current} -->
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ extends:
- name: azure-cosmos
groupId: com.azure
safeName: azurecosmos
- name: azure-spring-data-cosmos
- name: azure-spring-data-cosmos-core
groupId: com.azure
safeName: azurespringdatacosmos
safeName: azurespringdatacosmoscore
- name: azure-spring-data-2-2-cosmos
groupId: com.azure
safeName: azurespringdata22cosmos
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<module>azure-cosmos-encryption</module>
<module>azure-spring-data-2-2-cosmos</module>
<module>azure-spring-data-2-3-cosmos</module>
<module>azure-spring-data-cosmos</module>
<module>azure-spring-data-cosmos-core</module>
<module>azure-spring-data-test</module>
</modules>

Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ jobs:
TestName: Integration_Test_Spring_Data_Cosmosdb
ServiceDirectory: cosmos
Artifacts:
- name: azure-spring-data-cosmos
- name: azure-spring-data-cosmos-core
groupId: com.azure
safeName: azurespringdatacosmos
safeName: azurespringdatacosmoscore
TimeoutInMinutes: 90
Matrix:
Session_Integration:
Expand Down
2 changes: 1 addition & 1 deletion sdk/spring/azure-spring-boot-starter-cosmosdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ You can participate community driven [![Gitter](https://badges.gitter.im/Microso

## Next steps

Besides using this Azure CosmosDb Spring Boot Starter, you can directly use Spring Data for Azure CosmosDb package for more complex scenarios. Please refer to [Spring Data for Azure CosmosDB](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos) for more details.
Besides using this Azure CosmosDb Spring Boot Starter, you can directly use Spring Data for Azure CosmosDb package for more complex scenarios. Please refer to [Spring Data for Azure CosmosDB](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core) for more details.

## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
Expand Down