Skip to content

Commit 277d31f

Browse files
committed
Update dependencies in pom.xml and fix logical errors in GraphqlApp.java
1 parent 91ffad3 commit 277d31f

File tree

2 files changed

+45
-7
lines changed

2 files changed

+45
-7
lines changed

pom.xml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>3.4.1</version>
9+
<version>3.4.2</version>
1010
<relativePath/> <!-- lookup parent from repository -->
1111
</parent>
1212
<groupId>com.contentstack</groupId>
@@ -16,7 +16,7 @@
1616
<description>Demo project for graphql-springboot-api-integration</description>
1717
<properties>
1818
<java.version>17</java.version>
19-
<spring-boot.version>3.4.1</spring-boot.version>
19+
<spring-boot.version>3.4.2</spring-boot.version>
2020
<json-smart.version>2.5.2</json-smart.version>
2121
</properties>
2222

@@ -70,7 +70,45 @@
7070
<dependency>
7171
<groupId>org.jetbrains.kotlin</groupId>
7272
<artifactId>kotlin-stdlib</artifactId>
73-
<version>1.6.0</version>
73+
<version>2.1.0</version>
74+
</dependency>
75+
<!-- Fix Tomcat vulnerabilities -->
76+
<dependency>
77+
<groupId>org.apache.tomcat.embed</groupId>
78+
<artifactId>tomcat-embed-core</artifactId>
79+
<version>10.1.43</version>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.apache.tomcat.embed</groupId>
83+
<artifactId>tomcat-embed-el</artifactId>
84+
<version>10.1.43</version>
85+
</dependency>
86+
<dependency>
87+
<groupId>org.apache.tomcat.embed</groupId>
88+
<artifactId>tomcat-embed-websocket</artifactId>
89+
<version>10.1.43</version>
90+
</dependency>
91+
<!-- Fix Logback vulnerabilities -->
92+
<dependency>
93+
<groupId>ch.qos.logback</groupId>
94+
<artifactId>logback-core</artifactId>
95+
<version>1.5.13</version>
96+
</dependency>
97+
<dependency>
98+
<groupId>ch.qos.logback</groupId>
99+
<artifactId>logback-classic</artifactId>
100+
<version>1.5.13</version>
101+
</dependency>
102+
<!-- Fix Spring Framework vulnerabilities -->
103+
<dependency>
104+
<groupId>org.springframework</groupId>
105+
<artifactId>spring-web</artifactId>
106+
<version>6.2.8</version>
107+
</dependency>
108+
<dependency>
109+
<groupId>org.springframework</groupId>
110+
<artifactId>spring-context</artifactId>
111+
<version>6.2.8</version>
74112
</dependency>
75113
</dependencies>
76114
</dependencyManagement>

src/main/java/com/contentstack/gqlspring/GraphqlApp.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public String aboutUs(@RequestParam(name = "name", required = false, defaultValu
7575
ALL_FOOTER, FooterModel.class);
7676

7777

78-
if (headerResp == null | aboutResp == null | footerResp == null) {
78+
if (headerResp == null || aboutResp == null || footerResp == null) {
7979
model.addAttribute("home", "Could not fetch About page..");
8080
} else {
8181
model.addAttribute(ABOUT, ABOUT);
@@ -112,7 +112,7 @@ public String blogs(Model model) {
112112
ALL_FOOTER, FooterModel.class);
113113

114114

115-
if (headerResp == null | blogResp == null | archivedBlogsResp == null | allBlogListResp == null | footerResp == null) {
115+
if (headerResp == null || blogResp == null || archivedBlogsResp == null || allBlogListResp == null || footerResp == null) {
116116
model.addAttribute("home", "Could not fetch Blog page..");
117117
} else {
118118
model.addAttribute(BANNER, "blog");
@@ -141,7 +141,7 @@ public String contact(Model model) {
141141
Object footerResp = contentstack.getQuery(queryString,
142142
ALL_FOOTER, FooterModel.class);
143143

144-
if (headerResp == null | footerResp == null | contactusResp == null) {
144+
if (headerResp == null || footerResp == null || contactusResp == null) {
145145
model.addAttribute("home", "Could not fetch Contact page..");
146146
} else {
147147
model.addAttribute(HEADER, headerResp);
@@ -170,7 +170,7 @@ public String blogPost(@PathVariable String id, Model model) {
170170
Object footerResp = contentstack.getQuery(queryString,
171171
ALL_FOOTER, FooterModel.class);
172172

173-
if (headerResp == null | blogPostResp == null | blogResp == null | footerResp == null) {
173+
if (headerResp == null || blogPostResp == null || blogResp == null || footerResp == null) {
174174
model.addAttribute("blog post", "Could not fetch Blog post page..");
175175
} else {
176176
model.addAttribute(BANNER, "blog");

0 commit comments

Comments
 (0)