I do not believe the JDBC connectivity API allows this.
You have two options:
- GRANT appropriate permissions for the database level to allow only SELECT operations;
- Use Spring AOP and Security to intercept calls to record operations in the DAO and disallow them for specific roles.
The second choice is obviously more flexible and in the spirit of Spring’s natural idiom.
source
share