@Bean
    protected DriverManagerDataSource dataSource() {

        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
        dataSource.setUrl("jdbc:hsqldb:mem:shiro-spring");
        dataSource.setUsername("sa");

        return dataSource;
    }
Sample RDBMS data source that would exist in any application - not Shiro related.

@return
samples/spring-mvc/src/main/java/org/apache/shiro/samples/spring/config/ApplicationConfig.java