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 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
public class IndexController {
private final static Logger LOGGER = Logger.getLogger(IndexController.class.getName());
@GetMapping("/")
public String greeting(Device device) {
public String greeting(Device device) {
String deviceType = "browser";
String platform = "browser";
if (device.isNormal()) {
deviceType = "browser";
} else if (device.isMobile()) {
deviceType = "mobile";
} else if (device.isTablet()) {
deviceType = "tablet";
}
platform = device.getDevicePlatform().name();
if (platform.equalsIgnoreCase("UNKNOWN")) {
platform = "browser";
if (device.isNormal()) {
deviceType = "browser";
} else if (device.isMobile()) {
deviceType = "mobile";
} else if (device.isTablet()) {
deviceType = "tablet";
}
LOGGER.info("Client Device Type: " + deviceType +", Platform: " + platform);
return "index";
}
platform = device.getDevicePlatform().name();
if (platform.equalsIgnoreCase("UNKNOWN")) {
platform = "browser";
}
LOGGER.info("Client Device Type: " + deviceType + ", Platform: " + platform);
return "index";
}
}