Archive for the 'Development' Category

Scala + JPA + Spring + Buildr

Coming from a Java background, Scala looks real nice. So does Buildr. So I just had to try them out with Spring and JPA. Here’s a sample CRUD project that exercises basic JPA features with the aforementioned technologies.

First install Buildr as per http://buildr.apache.org/installing.html#jruby, unzip the project archive, cd to project root directory, then run buildr clean test.

You may also find http://buildr.apache.org/languages.html#scala useful.

Tested with JDK 6, JRuby 1.5.1, Buildr 1.4.0 and Scala 2.7.7.

Spring Security 3.0.x HTTP digest authentication configuration sample

Here’s a sample configuration file for HTTP digest authentication with Spring Security 3.0.x. Have a look at the xml comments for details.

The configuration was produced following the guidance given in Luke Taylor’s recent blog entry.

UPDATE: Apparently this can also be done using the security namespace like so:

<http entry-point-ref="digestAuthenticationEntryPoint">
    <intercept-url pattern="/**" access="ROLE_USER" />
    <custom-filter ref="digestAuthenticationFilter" position="BASIC_AUTH_FILTER" />
</http>

HTH,
Jukka