这是JAVA里的什么用法? - Java / Java SE
刚才看HIBERNET里的一个类里有如下红色代码,可以不用函数名的吗?这叫做什么用法?
Java code:
package db;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
/**
* Configures and provides access to Hibernate sessions, tied to the
* current thread of execution. Follows the Thread Local Session
* pattern, see {@link http://hibernate.org/42.html }.
*/
public class HibernateSessionFactory {
/**
* Location of hibernate.cfg.xml file.
* Location should be on the classpath as Hibernate uses
* #resourceAsStream style lookup for its configuration file.
* The default classpath location of the hibernate config file is
* in the default package. Use #setConfigFile() to update
* the location of the configuration file for the current session.
*/
private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";
private static final ThreadLocal threadLocal = new ThreadLocal();
private static Configuration configuration = new Configuration();
private static org.hibernate.SessionFactory sessionFactory;
private static String configFile = CONFIG_FILE_LOCATION;
[color=#FF0000]static {
try {
configuration.configure(configFile);
sessionFactory = configuration.buildSessi
相关问答:
一个JSP页面接收其他页面提交过来的FORM表单,但是要求只接收当前站点及其子站点提交过来的FORM表单,其他站点提交过来的表单不接收,这个怎么设置?
用过滤器
filter
将当前站点及其子站点放一个目录
然 ......
为什么HTML以及一些其它标签会显示一些特定表现形式呢?如HTML中的换行标签<BR/>在底层是怎样实现的呢?现实的原理是什么呢
去W3C官方网站上,看看吧!我想一看你就明白了
我猜和编译原理有关,浏览器里可 ......
如: @superwaring("unchecked");
这个里面都可以取哪些值啊,还有类似的 @superwaring标签有哪些啊
没用过。。
看jee的api
javax.persistence里
@superwaring("unchecked");只是忽略 ......
我写了个jsp页面,然后改动了一下,改动的内容就是在jsp页面的js函数里加了个alert()语句,但是我访问这个页面时,死活都是原来页面的内容,我加了很多alert函数还是没改动前的页面内容;tomcat重启了,也重新部署这 ......
怎么样将id传过去啊???是简单的传。。。在地址栏中写id号
LZ 好幽默!不知道你的意思?
是想把ID 传到ACTION ? 通过URl id=?
不够详细 别人不知道怎样帮你
../XXXXX.do?id=XXXX&id2=XXXXX
......