小编use*_*586的帖子

因为hibernate.connection.url是动态的,所以无法生成hibernate.reveng.xml

我想生成一个hibernate.reveng.xml中,但" hibernate.connection.URL "在hibernate.cfg.xml中是一个变量.

jdbc:jtds:sqlserver://${database.server.name}:1433/XXX_DB
Run Code Online (Sandbox Code Playgroud)

所以我的问题是如何让hibernate工具知道变量的定义?

java hibernate hibernate-tools

5
推荐指数
0
解决办法
430
查看次数

exec()中的python3 print()

在python3中,当我运行时

>>> exec("","","")
TypeError: exec() arg 2 must be a dict, not str
>>> exec( "print('Hello')", print("World"), print("!") )
World
!
Hello
>>> type(print("World"))
World
<class 'NoneType'>
Run Code Online (Sandbox Code Playgroud)

我的意思是在Python3中,exec()的arg2需要一个dict,但我们仍然可以放一个不是dict的print()函数.为什么?

python python-3.x python-exec

3
推荐指数
1
解决办法
322
查看次数