小编Joh*_*nNY的帖子

GIT分支可以有一个数据子集吗?

我试图找出GIT分支是否可以拥有项目数据的子集,如下例所示.

我正在研究一个java,spring,maven项目,我的源代码是

src/main/java
Run Code Online (Sandbox Code Playgroud)

我的JSP页面位于:

src/main/webapp
Run Code Online (Sandbox Code Playgroud)

我们正在考虑将JSP页面外包给diff组,但我们不希望它们更改java代码,因此我们试图思考是否可以映射一个分支

src/main/webapp
Run Code Online (Sandbox Code Playgroud)

然后将其合并回来

java git spring github

5
推荐指数
1
解决办法
186
查看次数

为什么我得到"无法加载ApplicationContext"Spring,jUnit和JavaConfig

为什么我得到"无法加载ApplicationContext"Spring,jUnit和JavaConfig

这是我的测试类:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = HelloWorldConfig.class)
public class TestApp
{

    @Test
    public void testBean()
    {
      ApplicationContext context = new AnnotationConfigApplicationContext(HelloWorldConfig.class);

      HelloWorld helloWorld = context.getBean(HelloWorld.class);
      helloWorld.setMessage("I am in Staten Island, New York");

      Assert.assertEquals(helloWorld.getMessage(), "I am in Staten Island, New York");
    }
}
Run Code Online (Sandbox Code Playgroud)

这是堆栈跟踪.

    java.lang.IllegalStateException: Failed to load ApplicationContext  at
org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99)
    at
org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122)
    at
org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
    at
org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
    at
org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:312)
    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211)    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288)
    at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284)
    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)  at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)     at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)   at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)     at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)    at …
Run Code Online (Sandbox Code Playgroud)

java junit spring

4
推荐指数
1
解决办法
4万
查看次数

标签 统计

java ×2

spring ×2

git ×1

github ×1

junit ×1