我的 IDE 是 eclipse -Helios,我使用 mojarra jsf、mysql、eclipselink for jpa。
在我的项目中,如果我在 mysql 中手动创建表,我可以在“JPA 详细信息”视图中看到这些表。如果我不创建任何表,Eclipse IDE 将显示错误“表“trainingsession”无法解析”。
我不确定出了什么问题。JPA 何时创建这些表?如何 ?我的 persistence.xml 如下,
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="wompower2" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>trainer</jta-data-source>
<class>com.jsfcompref.trainer.entity.User</class>
<class>com.jsfcompref.trainer.entity.TrainingSession</class>
<class>com.jsfcompref.trainer.entity.Event</class>
<class>com.jsfcompref.trainer.entity.AbstractEntity</class>
<validation-mode>NONE</validation-mode>
<properties>
<property name="eclipselink.target-database" value="MySQL"/>
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="both"/>
<property name="eclipselink.application-location" value="C:\wompower2\DDL"/>
<property name="eclipselink.create-ddl-jdbc-file-name" value="create.sql"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/demo"></property>
<property name="javax.persistence.jdbc.user" value="user"></property>
<property name="javax.persistence.jdbc.password" value="pwd"></property>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"></property>
</properties>
</persistence-unit>
</persistence>
Run Code Online (Sandbox Code Playgroud)
谢谢你,阿林达姆。
到目前为止,我在各种测试框架(Selenium,Tellurium,Canoo等)上阅读的所有文档都鼓励(或至少集中)通过UI对应用程序进行功能测试.我在下面看到的很少,我认为是最重要的
所以这是我的问题
1)你在UI测试自动化方面有什么特别的自动化?
2)哪个UI测试框架可以满足以上所有项目?
我正在为排球建立一个小网站(个人兴趣).赞赏用于安排游戏的算法的帮助
6支球队就是一个例子.我正在寻找适用于任意数量的团队,法院和团体的通用算法.
问候.
在集合中查找和标记重复对象的最佳方法是什么?让我们说我们有一个列表人员,我们的重复策略是基于名字和姓氏的完全匹配.
使用番石榴有一种简单的方法吗?
在Sphinx/reST中添加xml的建议方法是什么,以便在生成的doc中正确显示.
我精通Java.我几乎没有从DSL中受益的用例.在我开始构建它们之前,我想从已经构建它们的人那里获取信息.有人可以帮助我理解在Groovy和xtext中编写DSL的优点和缺点.
为什么即使在我指定之后我也收到了以下异常 requires-reply="false"
例外
org.springframework.integration.support.channel.ChannelResolutionException:没有输出通道或replyChannel标头可用
配置
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.1.xsd">
<int:channel id="inChannel">
</int:channel>
<bean id="upperService" class="sipackage.service.UppercaseService"></bean>
<int:service-activator requires-reply="false" input-channel="inChannel" ref="upperService" method="toUpper"></int:service-activator>
</beans>
Run Code Online (Sandbox Code Playgroud)
JUnit的
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/META-INF/spring/integration/sample.xml"})
public class ChannelTest {
@Autowired MessageChannel inChannel;
@Test
public void test() {
boolean sendOutcome=inChannel.send(MessageBuilder.withPayload("Hello, there 1!").build());
assertTrue(sendOutcome);
sendOutcome=inChannel.send(MessageBuilder.withPayload("Hello, there 2!").build());
assertTrue(sendOutcome);
}
}
Run Code Online (Sandbox Code Playgroud)
服务
public class UppercaseService {
public String toUpper(String msg)
{
return msg.toUpperCase();
}
}
Run Code Online (Sandbox Code Playgroud) 使用map reduce作业队列的真实世界用例是什么,即mapred.job.queue.name属性值.我default总是看到被用作价值.
想法是并行进行3次网络呼叫.(我使用Google作为演示目的的服务.以下工作,但不确定这是否正确或可以简化.如果我必须结合所有三个搜索的响应,我该怎么办?请指教.
public class GoogleSearchRx
{
public static void main(String args[])
{
CountDownLatch latch = new CountDownLatch(3);
search("RxJava").subscribeOn(Schedulers.io()).subscribe(
links -> {
links.forEach(link -> out.println(currentThreadName() + "\t" + link.text()));
latch.countDown();
},
e -> {
out.println(currentThreadName() + "\t" + "Failed: " + e.getMessage());
latch.countDown();
}
);
search("Reactive Extensions").subscribeOn(Schedulers.io()).subscribe(
links -> {
links.forEach(link -> out.println(currentThreadName() + "\t" + link.text()));
latch.countDown();
},
e -> {
out.println(currentThreadName() + "\t" + "Failed: " + e.getMessage());
latch.countDown();
}
);
//run the last one on current thread
search("Erik Meijer").subscribe( …Run Code Online (Sandbox Code Playgroud)