indentation changes (#1072)

* rest with spark java

* 4

* Update Application.java

* indentation changes
This commit is contained in:
Abhinab Kanrar 2017-01-30 02:10:44 +05:30 committed by maibin
parent d4c1ce44b6
commit 05fa8fc4dd
2 changed files with 25 additions and 25 deletions

View File

@ -7,7 +7,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
public class Application { public class Application {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args); SpringApplication.run(Application.class, args);
} }
} }

View File

@ -8,33 +8,32 @@ import org.springframework.web.bind.annotation.GetMapping;
@Controller @Controller
public class IndexController { public class IndexController {
private final static Logger LOGGER = Logger.getLogger(IndexController.class.getName()); private final static Logger LOGGER = Logger.getLogger(IndexController.class.getName());
@GetMapping("/") @GetMapping("/")
public String greeting(Device device) { public String greeting(Device device) {
String deviceType = "browser"; String deviceType = "browser";
String platform = "browser"; String platform = "browser";
if (device.isNormal()) { if (device.isNormal()) {
deviceType = "browser"; deviceType = "browser";
} else if (device.isMobile()) { } else if (device.isMobile()) {
deviceType = "mobile"; deviceType = "mobile";
} else if (device.isTablet()) { } else if (device.isTablet()) {
deviceType = "tablet"; deviceType = "tablet";
}
platform = device.getDevicePlatform().name();
if (platform.equalsIgnoreCase("UNKNOWN")) {
platform = "browser";
} }
LOGGER.info("Client Device Type: " + deviceType +", Platform: " + platform); platform = device.getDevicePlatform().name();
if (platform.equalsIgnoreCase("UNKNOWN")) {
return "index"; platform = "browser";
} }
LOGGER.info("Client Device Type: " + deviceType + ", Platform: " + platform);
return "index";
}
} }