Java

Ways to program your drone to do awesome stuff

Drones, quadcopters, RS helicopters and other remote controlled crafts are hot topic these days. We programmers are more interested in how to program them to do something cool. Indeed, it’s become more and more easy.

Spring MVC: how to build a thread-safe Controller

Controllers in Spring MVC are designed to be shared between requests. Each controller has a default singleton scope so if you are using controllers you need to be aware of that. The easiest way to make sure your controller is thread-safe is to avoid class variables. F.ex. this example from Spring MVC tutorial:

Hibernate: how to enable show sql

To see the SQL that your application sends to the database during the execution, insert the following property in your XML property file: