Skip to content

Commit

Permalink
Gets rid of hardcoded Db creds
Browse files Browse the repository at this point in the history
  • Loading branch information
murtuza-ranapur committed Apr 22, 2020
1 parent dd12520 commit 3208555
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/com/best/spring/controller/PingController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.best.spring.controller;

import com.best.spring.dto.PingDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ping")
public class PingController {

@GetMapping
public PingDTO getAllCourses() {
return new PingDTO();
}
}
13 changes: 13 additions & 0 deletions src/main/java/com/best/spring/dto/PingDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.best.spring.dto;

public class PingDTO {
private String message = "Hello World!";

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}

0 comments on commit 3208555

Please sign in to comment.