I\'m starting a new Java web app from scratch.
I don\'t have much experience on Spring Framework, but I know I\'d like to use some of its features, such as Transacc
If you're just starting then I'll recommend you using https://github.com/spring-projects/spring-boot
It has great autoconfiguration feature and saves writing boilerplate code. I even can release you from using application server due to embedded Tomcat. For example implementing simple MVC controller (which can be used as REST endpoints) looks like that:
@Controller
@EnableAutoConfiguration
public class SampleController {
@RequestMapping("/")
@ResponseBody
String home() {
return "Hello World!";
}
public static void main(String[] args) throws Exception {
SpringApplication.run(SampleController.class, args);
}
}
Now you can execute java -jar your_package.jar
and thats all. You will also get transaction management, database integration, etc. More examples can be found in mentioned link, especially in https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples directory