cleanup work
This commit is contained in:
parent
a746480326
commit
de6dbe897f
spring-all/src/main
java/org/baeldung
core
persistence
spring/config
web
resources
@ -0,0 +1,12 @@
|
||||
package org.baeldung.core;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ComponentUsingProperties {
|
||||
|
||||
public ComponentUsingProperties() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
@ -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.event.ContextRefreshedEvent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
// @Component
|
||||
@Component
|
||||
public class Setup implements ApplicationListener<ContextRefreshedEvent> {
|
||||
|
||||
private boolean setupDone;
|
||||
|
||||
@Autowired
|
||||
ServiceA serviceA;
|
||||
|
||||
@Autowired
|
||||
IServiceB serviceB;
|
||||
|
||||
public Setup() {
|
||||
super();
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
package org.baeldung.spring.config;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
|
||||
@Configuration
|
||||
@ImportResource("classpath:beansInXml.xml")
|
||||
@ImportResource("classpath:configForProperties.xml")
|
||||
@ComponentScan("org.baeldung.core")
|
||||
public class CoreConfig extends WebMvcConfigurerAdapter {
|
||||
|
||||
public CoreConfig() {
|
||||
|
@ -11,9 +11,9 @@ import org.springframework.web.servlet.view.JstlView;
|
||||
|
||||
@EnableWebMvc
|
||||
@Configuration
|
||||
public class ClientWebConfig extends WebMvcConfigurerAdapter {
|
||||
public class MvcConfig extends WebMvcConfigurerAdapter {
|
||||
|
||||
public ClientWebConfig() {
|
||||
public MvcConfig() {
|
||||
super();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanC1 implements IBeanC {
|
||||
|
||||
public BeanC1() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanC2 implements IBeanC {
|
||||
|
||||
public BeanC2() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanD implements IBeanD {
|
||||
|
||||
public BeanD() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
public interface IBeanC {
|
||||
//
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
public interface IBeanD {
|
||||
//
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
public interface IServiceA {
|
||||
//
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
public interface IServiceB {
|
||||
//
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user