Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Version updated to 2.2.0.RELEASE & Deprecated Code Fix #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.2.0.RELEASE</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Spring Boot Version from 2.0.4.RELEASE to 2.2.0.RELEASE

<relativePath/>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
package com.microsoft.azure.samples.hellospringboot;

import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
import static org.springframework.web.reactive.function.server.ServerResponse.ok;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.ServerResponse;
import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
import static org.springframework.web.reactive.function.server.ServerResponse.ok;

@SpringBootApplication
public class Application {

@Bean
HealthIndicator health() {
return () -> Health.status("I <3 Production!").build();
}
@Bean
HealthIndicator health() {
return () -> Health.status("I <3 Production!").build();
}

@Bean
RouterFunction<ServerResponse> routes() {
return route(GET("/api/hello"), request -> ok().syncBody("Hello, Azure!"));
}
@Bean
RouterFunction<ServerResponse> routes() {
return route(GET("/api/hello"), request -> ok().bodyValue("Hello, Azure!"));
}
Comment on lines -22 to +26

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed deprecated function syncBody and replaced the same with bodyValue


public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}