I am making a program and I need to read from main args but I don't know how to proceed.
my code
public class Application {
public static void main(String[] args) throws Exception {
SpringApplication.run(Application.class, args);
}
}
controller
@Controller
public class SampleControler {
@Autowired
private Checker checker;
@RequestMapping("/monitoring")
String home(Model map)
{
try {
map.addAttribute("donnee", checker.run(/*My main args has to be there*/);
return "index" ;
}catch (Exception e) {
return "error";
}
}
}
Can you anyone help?