我们正在使用maven和eclipse.我们有一个很大的多模块项目.
Eclispe-Maven整合似乎决定何时对建筑依赖模块作出反应,这是一种痛苦.
我打开了自动建筑,但似乎没有做任何改变.
有某些操作,例如:删除资源或启动模块,这将触发另一个模块的构建.
如何改变这种行为?我更喜欢根据需要手动调用maven.
我们刚刚升级了一些maven依赖项,触发了Jackson从1.7.x到1.9.x的更新
我们用来在setter方法上注释@JsonIgnore,对于不应该从客户端设置的方法.例如:对象的所有者(应该从身份验证主体设置)等.
在我们看来,这个注释的semanthincs已经改变了,这是可能的吗?现在该字段在所有情况下都是jsonignored,而不仅仅是在设置时.
那是这样吗?在1.9中有另一种方法来实现忽略SET吗?
谢谢!河
我们使用@Configuration类来进行基于Java的Spring配置.我正在尝试设置AnnotationConfigApplicationContext(s)的层次结构.
它似乎工作.因为我可以从父上下文中自动将bean作为从其中一个子上下文创建的bean的成员.
但是我没有管理从父上下文到@Configuration类文件的自动装配bean ,这非常方便.它们都是空的.
// parent context config
@Configuration
public class ParentContextConfig{
@Bean parentBeanOne...
@Bean parentBeanTwo...
}
Run Code Online (Sandbox Code Playgroud)
// child context config
@Configuration
public class ChildContextConfig{
@Autowired parentBeanOne
@Bean childBeanOne...
}
Run Code Online (Sandbox Code Playgroud)
// a sample bean
@Component
public class ChildBeanOne{
@Autowired parentBeanTwo
}
Run Code Online (Sandbox Code Playgroud)
在这个示例中,我得到的是parentBeanTwo正确创建的,而parentBeanOne不是autowired(null)到配置文件.
我错过了什么?
我正在尝试创建自定义注释以便快捷方式,就像在文档中引用一样:
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Transactional("order")
public @interface OrderTx {
}
Run Code Online (Sandbox Code Playgroud)
但是当我使用自定义注释注释方法时,我得到一个例外:
没有hibernate会话绑定到线程,配置不允许创建...
虽然注释方法与@Transactional完美的工作.
由于我正在注释的方法不属于从应用程序上下文实例化的Bean,我的猜测AnnotationTransactionAspect是不能使用自定义注释,并且AOP魔法不起作用.
如何获得快捷方式的自定义注释并在任何地方工作?
我错过了别的什么吗?
我们有一个EHCache集群,hibernate和Mysql.
一切都工作得很好.正在缓存条件搜索,并且当在群集的其他成员上修改记录时,缓存的查询会立即在其他服务器上更新.
但是,我的问题是插入新记录时.在缓存的查询过期之前,该表上的缓存查询不知道它.
我可能在我的EHcache.xml配置上遗漏了一些东西,但我不知道它会是什么.
有任何想法吗?
EHCache.xml如下:
`
<!--<diskStore path="java.io.tmpdir"/>-->
<!-- means for cache replication -->
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
properties="connect=
TCP(bind_port=10700):
S3_PING(...):
MERGE2(max_interval=30000;min_interval=10000):
FD_SOCK(start_port=0):
FD(timeout=3000;max_tries=3):
VERIFY_SUSPECT(timeout=1500):
BARRIER():
pbcast.NAKACK(use_mcast_xmit=false;gc_lag=0;retransmit_timeout=300,600,1200,2400,4800;discard_delivered_msgs=true):
UNICAST(timeout=300,600,1200):
pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=400K):
pbcast.GMS(print_local_addr=true;join_timeout=300;view_bundling=true):
FC(max_credits=2M;min_threshold=0.10):
FRAG2(frag_size=60K):
pbcast.STREAMING_STATE_TRANSFER()"
propertySeparator="::" />
<!-- default query cache to be used for all queries without an explicit cache -->
<cache
name="org.hibernate.cache.StandardQueryCache"
maxElementsInMemory="100"
eternal="false"
timeToLiveSeconds="600"
overflowToDisk="false"
statistics="true">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true,
replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true" />
</cache>
<!-- timestamps of particular last update time to tables -->
<cache
name="org.hibernate.cache.UpdateTimestampsCache"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false" …Run Code Online (Sandbox Code Playgroud)