Reputation: 679
I want to do DB auditing, for that I need to set ee.username for the connection used by mybatis.
My question is how could I do that. I tried to look for many search results but couldn't find anything useful. I'm using postgressql and java.
Upvotes: 1
Views: 2502
Reputation: 594
You may get it done by following method.
sqlSession.getConnection().prepareStatement("SET LOCAL ee.username = 'system'").execute();
Upvotes: 4