Skip to content

Commit b7e7d5c

Browse files
committed
feat:upgrade the package to Java 17
1 parent 5e7b524 commit b7e7d5c

File tree

13 files changed

+30
-24
lines changed

13 files changed

+30
-24
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ To customise the namespaces and create an application for your company please vi
1010

1111
1. Clone one of the Java projects to your local machine from one of the following repos:
1212
---
13-
1. Simple web API: [stacks-java repository](https://github.com/amido/stacks-java)
14-
2. Web API with CQRS: [stacks-java-cqrs repository](https://github.com/amido/stacks-java-cqrs)
15-
3. Web API with CQRS and events: [stacks-java-cqrs-events repository](https://github.com/amido/stacks-java-cqrs-events)
13+
1. Simple web API: [stacks-java repository](https://github.com/Ensono/stacks-java)
14+
2. Web API with CQRS: [stacks-java-cqrs repository](https://github.com/Ensono/stacks-java-cqrs)
15+
3. Web API with CQRS and events: [stacks-java-cqrs-events repository](https://github.com/Ensono/stacks-java-cqrs-events)
1616

1717
2. Build and run the application
1818
---
1919

20-
Note that at a minimum [Java 11](https://adoptopenjdk.net/) should be installed.
20+
Note that at a minimum [Java 17](https://adoptopenjdk.net/) should be installed.
2121

2222
Move to the `<PROJECT-NAME>/java` folder, then
2323

build/jenkins/azure/jenkins-pipelines-javaspring-k8s.Jenkinsfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pipeline {
117117
// e.g.:
118118
// args '-v /var/run/docker.sock:/var/run/docker.sock -u 1000:999'
119119
// Please check with your admin on any required steps you need to take to ensure a SUDOers access inside the containers
120-
image "azul/zulu-openjdk-debian:11"
120+
image "azul/zulu-openjdk-debian:17"
121121
}
122122
}
123123

@@ -215,7 +215,7 @@ pipeline {
215215
agent {
216216
docker {
217217
// add additional args if you need to here
218-
image "azul/zulu-openjdk-debian:11"
218+
image "azul/zulu-openjdk-debian:17"
219219
}
220220
}
221221

@@ -364,7 +364,7 @@ pipeline {
364364
agent {
365365
docker {
366366
// add additional args if you need to here
367-
image "azul/zulu-openjdk-debian:11"
367+
image "azul/zulu-openjdk-debian:17"
368368
}
369369
}
370370

@@ -866,7 +866,7 @@ pipeline {
866866
stage("PostDeployDev") {
867867
agent {
868868
docker {
869-
image "azul/zulu-openjdk-debian:11"
869+
image "azul/zulu-openjdk-debian:17"
870870
}
871871
}
872872

java/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@
237237
<groupId>jakarta.persistence</groupId>
238238
<artifactId>jakarta.persistence-api</artifactId>
239239
</dependency>
240+
<dependency>
241+
<groupId>org.springframework.data</groupId>
242+
<artifactId>spring-data-commons</artifactId>
243+
<version>3.3.1</version>
244+
</dependency>
240245

241246
</dependencies>
242247

java/src/main/java/com/amido/stacks/workloads/ApplicationConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
1717

1818
/** ApplicationConfig - Configuration class for Auth0 application security. */
19-
@Configuration("MySecurityConfig")
19+
@Configuration("mySecurityConfig")
2020
@EnableWebSecurity
2121
@Order(Ordered.HIGHEST_PRECEDENCE)
2222
public class ApplicationConfig {

java/src/main/java/com/amido/stacks/workloads/ApplicationNoSecurity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public WebSecurityCustomizer webSecurityCustomizer() {
3838
* @param http
3939
* @throws Exception
4040
*/
41-
@Bean(name = "test_SecurityFilterChain")
41+
@Bean(name = "testSecurityFilterChain")
4242
public SecurityFilterChain configure(HttpSecurity http) throws Exception {
4343
http.authorizeHttpRequests(auth -> auth.requestMatchers("**/*").anonymous())
4444
.httpBasic(withDefaults());

java/src/main/java/com/amido/stacks/workloads/menu/api/OpenApiConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
scheme = "bearer")
2222
public class OpenApiConfiguration {
2323

24-
private static final String PROJECT_URL = "https://github.com/amido/stacks-java";
25-
private static final String STACKS_EMAIL = "stacks@amido.com";
24+
private static final String PROJECT_URL = "https://github.com/Ensono/stacks-java";
25+
private static final String STACKS_EMAIL = "stacks@ensono.com";
2626
private static final String SPRING_DOC = "http://springdoc.org";
2727

2828
/** OAS/Swagger Configuration. */
@@ -38,7 +38,7 @@ public OpenAPI customOpenApi() {
3838
.title("Menu API")
3939
.version("1.0")
4040
.description("APIs used to interact and manage menus for a restaurant")
41-
.contact(new Contact().name("Amido").url(PROJECT_URL).email(STACKS_EMAIL))
41+
.contact(new Contact().name("Ensono").url(PROJECT_URL).email(STACKS_EMAIL))
4242
.license(new License().name("Apache 2.0").url(SPRING_DOC)));
4343
}
4444

java/src/main/java/com/amido/stacks/workloads/menu/domain/Menu.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
package com.amido.stacks.workloads.menu.domain;
22

3-
import jakarta.persistence.Id;
43
import java.util.ArrayList;
54
import java.util.List;
65
import lombok.AllArgsConstructor;
76
import lombok.Builder;
87
import lombok.Data;
8+
import org.springframework.data.annotation.Id;
99

1010
@Data
1111
@AllArgsConstructor
1212
@Builder
1313
public class Menu {
1414

15-
@Id private String id;
15+
@Id
16+
private String id;
1617

1718
private String restaurantId;
1819

java/src/main/java/com/amido/stacks/workloads/menu/service/v1/MenuService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public SearchMenuResult search(
6363
return new SearchMenuResult(
6464
pageSize,
6565
pageNumber,
66-
menuList.stream().map(searchMenuResultItemMapper::toDto).collect(Collectors.toList()));
66+
menuList.stream().map(searchMenuResultItemMapper::toDto).toList());
6767
}
6868

6969
public MenuDTO get(UUID id, String correlationId) {

java/src/main/resources/application-azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ azure:
44
enabled: true
55
keyvault:
66
enabled: false
7-
uri: https://amido.stacks-tmp.vault.azure.net/
7+
uri: https://ensono.stacks-tmp.vault.azure.net/
88
client-id: xxxxxx
99
client-key: xxxxxx
1010
tenant-id: xxxxxx
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#The issuer of the JWT Token. Typically, this is your Auth0 domain with an https://
2-
auth.issuer=https://amidostacks.eu.auth0.com/
2+
auth.issuer=https://ensonostacks.eu.auth0.com/
33

44
#The unique identifier for your API
5-
auth.apiAudience=https://amidostacks.eu.auth0.com/api/v2/
5+
auth.apiAudience=https://ensonostacks.eu.auth0.com/api/v2/
66

77
#Config switch to enable (true) or disable(false) Auth0.Provide either true or false to enable or disable
88
auth.isEnabled=false
99

10-
auth.resource.url=https://amidostacks.eu.auth0.com/oauth/tokenLocal
10+
auth.resource.url=https://ensonostacks.eu.auth0.com/oauth/tokenLocal
1111

1212
auth.token.url=/v1/tokenLocal

java/src/main/resources/local/application-azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ azure:
44
enabled: true
55
keyvault:
66
enabled: false
7-
uri: https://amido.stacks-tmp.vault.azure.net/
7+
uri: https://ensono.stacks-tmp.vault.azure.net/
88
client-id: xxxxxx
99
client-key: xxxxxx
1010
tenant-id: xxxxxx

stackscli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ framework:
44
name: java
55
commands:
66
- name: java
7-
version: ">= 11"
7+
version: ">= 17"
88

99
# Pipeline files
1010
pipeline:

stacksclipom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<version>1.0.0</version>
99

1010
<properties>
11-
<maven.compiler.source>11</maven.compiler.source>
12-
<maven.compiler.target>11</maven.compiler.target>
11+
<maven.compiler.source>17</maven.compiler.source>
12+
<maven.compiler.target>17</maven.compiler.target>
1313
<main.basedir>.</main.basedir>
1414
<source.basedir>${main.basedir}/stacks</source.basedir>
1515
<build.basedir>${main.basedir}/build</build.basedir>

0 commit comments

Comments
 (0)