Skip to content

Commit

Permalink
feat:upgrade the package to Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
arathykrishna24 committed Jul 17, 2024
1 parent 5e7b524 commit 313a303
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To customise the namespaces and create an application for your company please vi
2. Build and run the application
---

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pipeline {
// e.g.:
// args '-v /var/run/docker.sock:/var/run/docker.sock -u 1000:999'
// Please check with your admin on any required steps you need to take to ensure a SUDOers access inside the containers
image "azul/zulu-openjdk-debian:11"
image "azul/zulu-openjdk-debian:17"
}
}

Expand Down Expand Up @@ -215,7 +215,7 @@ pipeline {
agent {
docker {
// add additional args if you need to here
image "azul/zulu-openjdk-debian:11"
image "azul/zulu-openjdk-debian:17"
}
}

Expand Down Expand Up @@ -364,7 +364,7 @@ pipeline {
agent {
docker {
// add additional args if you need to here
image "azul/zulu-openjdk-debian:11"
image "azul/zulu-openjdk-debian:17"
}
}

Expand Down Expand Up @@ -866,7 +866,7 @@ pipeline {
stage("PostDeployDev") {
agent {
docker {
image "azul/zulu-openjdk-debian:11"
image "azul/zulu-openjdk-debian:17"
}
}

Expand Down
5 changes: 5 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>3.3.1</version>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

/** ApplicationConfig - Configuration class for Auth0 application security. */
@Configuration("MySecurityConfig")
@Configuration("mySecurityConfig")
@EnableWebSecurity
@Order(Ordered.HIGHEST_PRECEDENCE)
public class ApplicationConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public WebSecurityCustomizer webSecurityCustomizer() {
* @param http
* @throws Exception
*/
@Bean(name = "test_SecurityFilterChain")
@Bean(name = "testSecurityFilterChain")
public SecurityFilterChain configure(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(auth -> auth.requestMatchers("**/*").anonymous())
.httpBasic(withDefaults());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
package com.amido.stacks.workloads.menu.domain;

import jakarta.persistence.Id;
import java.util.ArrayList;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import org.springframework.data.annotation.Id;

@Data
@AllArgsConstructor
@Builder
public class Menu {

@Id private String id;
@Id
private String id;

private String restaurantId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public SearchMenuResult search(
return new SearchMenuResult(
pageSize,
pageNumber,
menuList.stream().map(searchMenuResultItemMapper::toDto).collect(Collectors.toList()));
menuList.stream().map(searchMenuResultItemMapper::toDto).toList());
}

public MenuDTO get(UUID id, String correlationId) {
Expand Down
2 changes: 1 addition & 1 deletion stackscli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ framework:
name: java
commands:
- name: java
version: ">= 11"
version: ">= 17"

# Pipeline files
pipeline:
Expand Down
4 changes: 2 additions & 2 deletions stacksclipom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<version>1.0.0</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<main.basedir>.</main.basedir>
<source.basedir>${main.basedir}/stacks</source.basedir>
<build.basedir>${main.basedir}/build</build.basedir>
Expand Down

0 comments on commit 313a303

Please sign in to comment.