November 2017
Intermediate to advanced
542 pages
14h 24m
English
Next, we need to update the scripts that are being loaded at startup. We need to remove the security-user-authorities.sql mapping so that our users no longer obtain their authorities with direct mapping. We then need to add two additional SQL scripts. Update the DataSource bean configuration to load the SQL required for GBAC, as follows:
//src/main/java/com/packtpub/springsecurity/configuration/DataSourceConfig.java @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder() .setName("dataSource") .setType(EmbeddedDatabaseType.H2) .addScript("/database/h2/calendar-schema.sql") .addScript("/database/h2/calendar-data.sql") .addScript("/database/h2/security-schema.sql") .addScript("/database/h2/security-users.sql") ...Read now
Unlock full access