cleanup work

This commit is contained in:
eugenp 2013-06-01 00:54:49 +03:00
parent a746480326
commit de6dbe897f
15 changed files with 20 additions and 132 deletions

View File

@ -0,0 +1,12 @@
package org.baeldung.core;
import org.springframework.stereotype.Component;
@Component
public class ComponentUsingProperties {
public ComponentUsingProperties() {
super();
}
}

View File

@ -1,20 +1,14 @@
package org.baeldung.web; package org.baeldung.persistence;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
// @Component @Component
public class Setup implements ApplicationListener<ContextRefreshedEvent> { public class Setup implements ApplicationListener<ContextRefreshedEvent> {
private boolean setupDone; private boolean setupDone;
@Autowired
ServiceA serviceA;
@Autowired
IServiceB serviceB;
public Setup() { public Setup() {
super(); super();
} }

View File

@ -1,11 +1,13 @@
package org.baeldung.spring.config; package org.baeldung.spring.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.ImportResource;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration @Configuration
@ImportResource("classpath:beansInXml.xml") @ImportResource("classpath:configForProperties.xml")
@ComponentScan("org.baeldung.core")
public class CoreConfig extends WebMvcConfigurerAdapter { public class CoreConfig extends WebMvcConfigurerAdapter {
public CoreConfig() { public CoreConfig() {

View File

@ -11,9 +11,9 @@ import org.springframework.web.servlet.view.JstlView;
@EnableWebMvc @EnableWebMvc
@Configuration @Configuration
public class ClientWebConfig extends WebMvcConfigurerAdapter { public class MvcConfig extends WebMvcConfigurerAdapter {
public ClientWebConfig() { public MvcConfig() {
super(); super();
} }

View File

@ -1,22 +0,0 @@
package org.baeldung.spring.config;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
@EnableWebMvc
@ComponentScan("org.baeldung.web")
public class WebConfig extends WebMvcConfigurerAdapter {
@Autowired
BeanFactory beanFactory;
public WebConfig() {
super();
}
}

View File

@ -1,12 +0,0 @@
package org.baeldung.web;
import org.springframework.stereotype.Component;
@Component
public class BeanC1 implements IBeanC {
public BeanC1() {
super();
}
}

View File

@ -1,12 +0,0 @@
package org.baeldung.web;
import org.springframework.stereotype.Component;
@Component
public class BeanC2 implements IBeanC {
public BeanC2() {
super();
}
}

View File

@ -1,12 +0,0 @@
package org.baeldung.web;
import org.springframework.stereotype.Component;
@Component
public class BeanD implements IBeanD {
public BeanD() {
super();
}
}

View File

@ -1,5 +0,0 @@
package org.baeldung.web;
public interface IBeanC {
//
}

View File

@ -1,5 +0,0 @@
package org.baeldung.web;
public interface IBeanD {
//
}

View File

@ -1,5 +0,0 @@
package org.baeldung.web;
public interface IServiceA {
//
}

View File

@ -1,5 +0,0 @@
package org.baeldung.web;
public interface IServiceB {
//
}

View File

@ -1,22 +0,0 @@
package org.baeldung.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class ServiceA {
@Autowired
public ServiceA(final IServiceB serviceB) {
super();
}
//
public void testA() {
System.out.println();
}
}

View File

@ -1,20 +0,0 @@
package org.baeldung.web;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class ServiceB implements IServiceB {
public ServiceB() {
super();
}
//
public void testB() {
System.out.println();
}
}