-
Dec 24th, 2012, 05:06 AM
#1
Can I make a controller just using @Configuration?
I want to make some "generic controllers" but I don't want to make a new class file and extends. I just want to "register" them on a configuration class.
Can I do something like these? There's an alternative for this?
@Configuration
public class WebConfig {
@Controller // or @Bean
@RequestMapping("/sex")
public Controller<Sex, Long> sexController() {
return new GenericController<Sex, Long>() {
};
}
}
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules