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

Update dependencies #140

Merged
merged 2 commits into from
May 31, 2024
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
14 changes: 7 additions & 7 deletions docs/getting-started.adoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
= How to setup `spring-data-aerospike` in Spring Boot application
= How to set up `spring-data-aerospike` in Spring Boot application
:toc:

:spring-boot-version: 2.6.5
:spring-data-aerospike-version: 3.3.1
:spring-boot-version: 3.3.0
:spring-data-aerospike-version: 4.8.0

== Setting up the project

In this section we'll cover setup of the project from the start.

First, we'll need to setup the basic project structure.
First, we'll need to set up the basic project structure.
You can do it either manually if you are familiar with the process or do it via https://start.spring.io/[Spring Initializr].

In Spring Initializr you'll need to select:
Expand All @@ -21,14 +21,14 @@ In Spring Initializr you'll need to select:
.Options to select
image::../images/spring-initializr.png[height=400]

Press Generate button in the bottom of the page and you'll get zip with initial project. Import project into your
Press Generate button in the bottom of the page, and you'll get zip with initial project. Import project into your
favorite IDE and run the test. It should be green and that means that you are ready to continue to the next section.

== Adding `spring-data-aerospike` dependency

[NOTE]
====
`spring-data-aerospike` is a Community project and the dependency is not managed by Spring, it has it's own release cycle
`spring-data-aerospike` is a Community project and the dependency is not managed by Spring, it has its own release cycle
and is not included into Spring Boot dependency management. Available versions can be checked on
https://mvnrepository.com/artifact/com.aerospike/spring-data-aerospike[Maven Central].

Expand Down Expand Up @@ -162,7 +162,7 @@ NOTE: `spring-cloud-starter-bootstrap` is required to be present on classpath. I
include::../pom.xml[tags=test-deps]
----

This will setup Aerospike container when the test starts.
This will set up Aerospike container when the test starts.

Add Aerospike configuration to the test resources:

Expand Down
14 changes: 7 additions & 7 deletions docs_processed/getting-started.adoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
= How to setup `spring-data-aerospike` in Spring Boot application
= How to set up `spring-data-aerospike` in Spring Boot application
:toc:

:spring-boot-version: 2.5.3
:spring-data-aerospike-version: 3.0.0
:spring-boot-version: 3.3.0
:spring-data-aerospike-version: 4.8.0

== Setting up the project

In this section we'll cover setup of the project from the start.

First, we'll need to setup the basic project structure.
First, we'll need to set up the basic project structure.
You can do it either manually if you are familiar with the process or do it via https://start.spring.io/[Spring Initializr].

In Spring Initializr you'll need to select:
Expand All @@ -21,14 +21,14 @@ In Spring Initializr you'll need to select:
.Options to select
image::../images/spring-initializr.png[height=400]

Press Generate button in the bottom of the page and you'll get zip with initial project. Import project into your
Press Generate button in the bottom of the page, and you'll get zip with initial project. Import project into your
favorite IDE and run the test. It should be green and that means that you are ready to continue to the next section.

== Adding `spring-data-aerospike` dependency

[NOTE]
====
`spring-data-aerospike` is a Community project and the dependency is not managed by Spring, it has it's own release cycle
`spring-data-aerospike` is a Community project and the dependency is not managed by Spring, it has its own release cycle
and is not included into Spring Boot dependency management. Available versions can be checked on
https://mvnrepository.com/artifact/com.aerospike/spring-data-aerospike[Maven Central].

Expand Down Expand Up @@ -361,7 +361,7 @@ NOTE: `spring-cloud-starter-bootstrap` is required to be present on classpath. I
</dependency>
----

This will setup Aerospike container when the test starts.
This will set up Aerospike container when the test starts.

Add Aerospike configuration to the test resources:

Expand Down
16 changes: 10 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.0</version>
<version>3.3.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand All @@ -18,10 +18,10 @@

<properties>
<java.version>17</java.version>
<spring-cloud-dependencies.version>2023.0.0</spring-cloud-dependencies.version>
<spring-data-aerospike.version>4.6.0</spring-data-aerospike.version>
<embedded-aerospike.version>3.1.1</embedded-aerospike.version>
<testcontainers>1.19.3</testcontainers>
<spring-cloud-dependencies.version>2023.0.1</spring-cloud-dependencies.version>
<spring-data-aerospike.version>4.8.0</spring-data-aerospike.version>
<embedded-aerospike.version>3.1.6</embedded-aerospike.version>
<testcontainers>1.19.8</testcontainers>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -89,6 +89,11 @@
<artifactId>spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<!-- tag::test-deps[] -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -128,5 +133,4 @@
</plugin>
</plugins>
</build>

</project>
30 changes: 30 additions & 0 deletions src/main/java/com/example/demo/controllers/MovieController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.example.demo.controllers;

import com.example.demo.service.Movie;
import com.example.demo.service.MovieOperations;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.Optional;

@RestController
@AllArgsConstructor
public class MovieController {

MovieOperations movieService;

@GetMapping("/movies/{name}")
public Optional<Movie> findMovieByName(@PathVariable("name") String movieName) {
return movieService.findMovie(movieName);
}

@PostMapping("/movies")
public void addMovie(@RequestBody Movie movie) {
movieService.createMovie(movie);
}

@DeleteMapping("/movies/{name}")
public void deleteMovieByName(@PathVariable("name") String movieName) {
movieService.deleteMovie(movieName);
}
}
4 changes: 3 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

# Aerospike
aerospike.hosts=localhost:3000
aerospike.namespace=test
Loading