Deepening knowledge of the company's employees is the key to let them develop themselves and keep them in good mental condition. There are a couple of ways to provide them with it. Of course, an interesting and challenging project should be a major factor, as most of the developers' time is consumed there. Giving them an opportunity to take part in side projects, for example, via hackathons is also a great way to explore new areas.
Another great idea to expand their horizons is just to let your employees share knowledge between themselves. Here comes a fairly easy way to make it work, which is Lightning Talks!