I have seen in many places
@SpringBootApplication
public class Application {
private static final Logger log =
LoggerFactory.getLogger(Application.class);
public static void main(String[] args){
SpringApplication.run(Application.class, args);
}
@Bean
public CommandLineRunner demo(UserRepository repo) {
return (args) -> {
};
}
}
how does
@Bean
public CommandLineRunner demo(UserRepository repo) {
return (args) -> {
};
}
return an object of type CommandLineRunner
it return a function
(args) -> {
};
I am not able to understand the syntax also.
Can someone help me to understand