Skip to content
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
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ jobs:
distribution: 'corretto'

- name: Setup gradle
uses: gradle/gradle-build-action@v3
run: ls

- name: Run the Tests
uses: ./gradlew test
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with gradle
run: ./gradlew build
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/webapp/controller/WebAppController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import com.webapp.data.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.io.File;
import java.io.IOException;

@RestController
@Slf4j
public class WebAppController {
@Autowired
ObjectMapper objectMapper;
Expand All @@ -20,4 +23,10 @@ public ResponseEntity<?> app() throws IOException {
Data data = Data.builder().name("Nitin").email("j9.nitin@gmail.com").build();
return ResponseEntity.ok(data);
}
@GetMapping(path = "/app/{id}")
public ResponseEntity<?> app(@PathVariable Integer id) throws IOException {
Data data = Data.builder().name("Nitin").email("j9.nitin@gmail.com").build();
log.info("Id is {}",id);
return ResponseEntity.ok(data);
}
}