我使用的是spring 3.0.6,jpa 2.0,hibernate 3.6.8.我的问题是,在哪种情况下javassist用于为EntityClass创建"代理"?这个代理的原因是什么?我有以下实体:
@Entity
public MyEntity{
..
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "adresseID")
private Adresse adresse;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "myEntity")
private List<Parameter> parameters;
..
}
Run Code Online (Sandbox Code Playgroud)
当我从db加载MyEntity时,实体类就像MyEntity __ $$ _ javassist.为什么这样做?做什么的?我认为这里只能使用常规类MyEntity.
要实现延迟加载,我们可以:
那么什么是让MyEntity迷恋的理由呢?在哪里我可以阅读更多关于它的内容?你能推荐哪本书/文章/博客?
我想与SPNEGO进行身份验证.我用:
我的Config文件如下所示.当我尝试使用上面的库进行身份验证时,我得到以下异常.
有人有同样的问题并处理它?
配置文件(取自spring security kerberos示例):
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<!-- This configuration uses SPNEGO by default, but one could also use a form if he directly goes to /login.html -->
<sec:http entry-point-ref="spnegoEntryPoint" use-expressions="true">
<sec:intercept-url pattern="/secure/**" access="isAuthenticated()" />
<sec:custom-filter ref="spnegoAuthenticationProcessingFilter"
position="BASIC_AUTH_FILTER" />
<sec:form-login login-page="/login.html" default-target-url="/secure/index.jsp"/>
</sec:http>
<bean id="spnegoEntryPoint"
class="org.springframework.security.extensions.kerberos.web.SpnegoEntryPoint" />
<bean id="spnegoAuthenticationProcessingFilter"
class="org.springframework.security.extensions.kerberos.web.SpnegoAuthenticationProcessingFilter">
<property name="authenticationManager" ref="authenticationManager" />
</bean>
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider ref="kerberosServiceAuthenticationProvider" /> <!-- Used …Run Code Online (Sandbox Code Playgroud) 我在我的HTML页面中有如下所示的标题,我在IE8中打开此站点.当我在"Web Developer"中查看时,"if IE 7"处于活动状态.WebBrowser在"IE8 Compact VIew"上设置BrowserMode,在"IE7标准"上设置"文档模式".我在网站上有javascript,这对这些设置不起作用.为什么会这样?为什么IE变量等于7?为什么浏览器处于这些模式?
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="de" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="de" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="de" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="de" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="de" class="no-js"> <!--<![endif]-->
Run Code Online (Sandbox Code Playgroud) compatibility internet-explorer internet-explorer-8 ie-compatibility-mode