BAEL-1128: A Practical Guide to Java Remote Debugging (#3144)
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
2ed8da65c1
commit
f5a5c02053
+12
@@ -0,0 +1,12 @@
|
||||
package com.stackify.debug;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class JavaRemoteDebuggingApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(JavaRemoteDebuggingApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.stackify.debug.config;
|
||||
|
||||
import com.stackify.debug.JavaRemoteDebuggingApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
|
||||
public class WebInitializer extends SpringBootServletInitializer {
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application.sources(JavaRemoteDebuggingApplication.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.stackify.debug.rest;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/hello")
|
||||
public class HelloController {
|
||||
|
||||
@GetMapping
|
||||
public String hello(@RequestParam("name") String name) {
|
||||
String message = "Hello, " + name;
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user