UpperTableStrategy.java 736 B

12345678910111213141516171819202122
  1. package com.huimv.getdata.configuration;
  2. import org.hibernate.boot.model.naming.Identifier;
  3. import org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl;
  4. import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
  5. /**
  6. * @Project : huimv.shiwan
  7. * @Package : com.huimv.biosafety.uface.controller
  8. * @Description : TODO
  9. * @Version : 1.0
  10. * @Author : ZhuoNing
  11. * @Create : 2020-12-25
  12. **/
  13. public class UpperTableStrategy extends PhysicalNamingStrategyStandardImpl {
  14. @Override
  15. public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment context) {
  16. // 将表名全部转换成大写
  17. String tableName = name.getText().toUpperCase();
  18. return Identifier.toIdentifier(tableName);
  19. }
  20. }