使用哪种方法来隐藏/删除SWT中的列(特别是在Eclipse插件中)?
我也应该这样
我正在将持续集成系统从Teamcity迁移到Jenkins.我们为我们所有的项目都有一个svn存储库,如下所示:
project/dev_db_build (folder)
project/module1 (folder)
project/module2 (folder)
projets/pom.xml
Run Code Online (Sandbox Code Playgroud)
为了在CI服务器上构建数据库,我使用url project/dev_db_build并且可以在有更改时使用此URL来触发构建.
对于构建应用程序,我使用url项目/所以如果我轮询它并且对dev_db_build进行更改应该忽略并在db_build成功后触发应用程序构建.
在团队中,我使用了"触发模式".但在詹金斯有很多触发插件https://wiki.jenkins-ci.org/display/JENKINS/Plugins#Plugins-Buildtriggers - 我调查了其中一些并且找不到合适的插件.
我的根本问题是,当我为控制器和Freemarker视图运行基于"spring-test"的测试时,我需要在WEB-INF/lib文件夹中包含所有taglib - 否则freemarker将无法在测试期间找到它们.我使用以下maven配置解决了这个问题.它实际上在运行测试之前将taglibs jar复制到src/main/webapp/WEB-INF/lib文件夹.我不想清除此文件夹,因为在为IDE运行此测试时问题是相同的.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<!-- Freemaarker requires that all taglibs should reside in WEB-INF/lib folder -->
<execution>
<id>tests</id>
<phase>test-compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/src/main/webapp/WEB-INF/lib/</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${spring.security.version}</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
现在我正在将我的项目迁移到gradle.如何用gradle实现同样的目标?
我有一个spring,hibernate和flyway项目来创建数据库模式.所以我有
spring.jpa.hibernate.ddl-auto: validate
Run Code Online (Sandbox Code Playgroud)
在我的application.properties文件中.此配置在正常运行期间(在打包可执行jar文件并从终端运行它之后):
2014-10-06 10:06:17.863 INFO 7519 --- [ main] o.h.tool.hbm2ddl.SchemaValidator : HHH000229: Running schema validator
Run Code Online (Sandbox Code Playgroud)
但是在通过maven运行测试时会被忽略.
1804 [main] INFO o.h.tool.hbm2ddl.SchemaExport - HHH000227: Running hbm2ddl schema export
1805 [main] DEBUG org.hibernate.SQL - drop table test_entity if exists
1806 [main] DEBUG org.hibernate.SQL - drop sequence hibernate_sequence
1807 [main] DEBUG org.hibernate.SQL - create table test_entity (id bigint not null, name varchar(255), primary key (id))
1807 [main] DEBUG org.hibernate.SQL - create sequence hibernate_sequence
1808 [main] INFO o.h.tool.hbm2ddl.SchemaExport - HHH000230: Schema export complete …Run Code Online (Sandbox Code Playgroud) 有没有办法用JPA 2编写CriteriaBuilder相当于以下查询?
select * from season s1
where end = (
select max(end)
from season s2
where s1.contest_id=s2.contest_id
);
Run Code Online (Sandbox Code Playgroud)
在JPQL中,此查询是:
Select s1 from Season s1
where s1.end = (
select max(s2.end)
from Season s2
where s1.contest=s2.contest
)
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用jmx-exported方法运行一个简单的应用程序.我喜欢(spring-context和"@Configuration"的cglib在classpath中):
package com.sopovs.moradanen.jmx;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jmx.export.MBeanExporter;
import org.springframework.stereotype.Component;
@Component
@Configuration
public class SpringJmxTest {
public static void main(String[] args) {
new AnnotationConfigApplicationContext("com.sopovs.moradanen.jmx");
while (true) {
Thread.yield();
}
}
@Bean
public MBeanExporter createJmxExporter() {
return new MBeanExporter();
}
public interface FooBarMBean {
public String hello();
}
@Component
public static class FooBar implements FooBarMBean {
@Override
public String hello() {
return "Hello";
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是,当我运行它时,我得到:javax.management.MalformedObjectNameException:键属性不能为空.我尝试调试并解决它:
@Component
public static class FooBar implements FooBarMBean, SelfNaming {
@Override
public …Run Code Online (Sandbox Code Playgroud)