liguofeng29’s blog

個人勉強用ブログだっす。

java

spring4 - @Qualifier, alias

@Qualifierは、bean名を指定してDIを行う package spring4.second; public interface SomeService { public String getMessage(); } package spring4.second; import org.springframework.stereotype.Component; @Component("SomeServiceAImpl") public cl…

Spring4 - BeanFactoryPostProcessor

Beanを遅延生成させる @Component public class LazyInitBeanFactoryPostProcessor implements BeanFactoryPostProcessor { @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { for (Stri…

junit.framework.TestSuiteを使って、AllTest.javaを実装する。

・AllTest.java package org.lee.samle; import junit.framework.JUnit4TestAdapter; import junit.framework.Test; import junit.framework.TestSuite; public class AllTest { public static Test suite() { TestSuite suite = new TestSuite(); // TestCa…

Hello World.

「Hello World!」 public class HelloWorld { public static void main(String[] args) { // console print out System.out.println("Hello World!"); } }