Update to OpenSSh 7.3(Ubuntu)

You may be required – for example by PCI compliance – to update your SSH server to plug some vulnerabilities that some dumb scanner has flagged. The fact is alot of these vulnerabilities are probably already patched as part of OS updates, but you may be required to do it for some other reason.

 

Continue reading Update to OpenSSh 7.3(Ubuntu)

Ignore file extensions in Spring MVC

If you’re using Java configuration (i.e. not XML) and are using endpoints that have a “.” in the last token of the path you’ll probably have noticed the default Spring behaviour where anything after the “.” is truncated.

Luckily there’s a simple fix.

Continue reading Ignore file extensions in Spring MVC

Multiple MongoDB connections in Spring JPA

You will often come across the case where you have your main MongoDB database for your application, and then require some other database (perhaps on an entirely different server). Luckily Spring JPA / MongoDB integration is incredibly flexible and it’s a fairly straightforward process.

In the example below I use class-defined configuration/beans rather than XML files.

Continue reading Multiple MongoDB connections in Spring JPA