BAEL-20262: Migrate spring-core-2 module to the com.baeldung package

This commit is contained in:
Krzysztof Woyke 2019-12-20 12:56:36 +01:00
parent c69b2a5ca3
commit fd92e64815
112 changed files with 150 additions and 151 deletions

View File

@ -201,7 +201,7 @@
</profiles> </profiles>
<properties> <properties>
<start-class>org.baeldung.sample.App</start-class> <start-class>com.baeldung.sample.App</start-class>
<!-- Spring --> <!-- Spring -->
<org.springframework.version>5.0.6.RELEASE</org.springframework.version> <org.springframework.version>5.0.6.RELEASE</org.springframework.version>
<annotation-api.version>1.3.2</annotation-api.version> <annotation-api.version>1.3.2</annotation-api.version>

View File

@ -1,4 +1,4 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;

View File

@ -1,10 +1,10 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
@ComponentScan("org.baeldung.autowire.sample") @ComponentScan("com.baeldung.autowire.sample")
public class AppConfig { public class AppConfig {
} }

View File

@ -1,4 +1,4 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -0,0 +1,5 @@
package com.baeldung.autowire.sample;
public class FooDAO {
}

View File

@ -1,4 +1,4 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
public interface Formatter { public interface Formatter {

View File

@ -1,4 +1,4 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -1,7 +1,7 @@
package org.baeldung.bean.config; package com.baeldung.bean.config;
import org.baeldung.bean.injection.Helm; import com.baeldung.bean.injection.Helm;
import org.baeldung.bean.injection.Ship; import com.baeldung.bean.injection.Ship;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -1,7 +1,7 @@
package org.baeldung.bean.config; package com.baeldung.bean.config;
import org.baeldung.bean.injection.Helm; import com.baeldung.bean.injection.Helm;
import org.baeldung.bean.injection.Ship; import com.baeldung.bean.injection.Ship;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
public class SetterBasedShipConfig { public class SetterBasedShipConfig {

View File

@ -1,4 +1,4 @@
package org.baeldung.bean.injection; package com.baeldung.bean.injection;
public class Helm { public class Helm {

View File

@ -1,4 +1,4 @@
package org.baeldung.bean.injection; package com.baeldung.bean.injection;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,9 +1,9 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
@ComponentScan("org.baeldung.customannotation") @ComponentScan("com.baeldung.customannotation")
public class CustomAnnotationConfiguration { public class CustomAnnotationConfiguration {
} }

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.customscope; package com.baeldung.customscope;
public class TenantBean { public class TenantBean {

View File

@ -1,4 +1,4 @@
package org.baeldung.customscope; package com.baeldung.customscope;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.BeanFactoryPostProcessor;

View File

@ -1,4 +1,4 @@
package org.baeldung.customscope; package com.baeldung.customscope;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.customscope; package com.baeldung.customscope;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,4 +1,4 @@
package org.baeldung.customscope; package com.baeldung.customscope;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@ -1,4 +1,4 @@
package org.baeldung.nullibility; package com.baeldung.nullibility;
import org.springframework.lang.NonNull; import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;

View File

@ -0,0 +1,6 @@
@NonNullApi
@NonNullFields
package com.baeldung.nullibility;
import org.springframework.lang.NonNullApi;
import org.springframework.lang.NonNullFields;

View File

@ -1,4 +1,4 @@
package org.baeldung.order; package com.baeldung.order;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;

View File

@ -1,4 +1,4 @@
package org.baeldung.order; package com.baeldung.order;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;

View File

@ -1,4 +1,4 @@
package org.baeldung.order; package com.baeldung.order;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.order; package com.baeldung.order;
public interface Rating { public interface Rating {

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence; package com.baeldung.persistence;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.ContextRefreshedEvent;

View File

@ -1,4 +1,4 @@
package org.baeldung.primary; package com.baeldung.primary;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
@Configuration @Configuration
@ComponentScan(basePackages="org.baeldung.primary") @ComponentScan(basePackages="com.baeldung.primary")
public class Config { public class Config {
@Bean @Bean

View File

@ -1,4 +1,4 @@
package org.baeldung.primary; package com.baeldung.primary;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.primary; package com.baeldung.primary;
/** /**
* Created by Gebruiker on 7/17/2018. * Created by Gebruiker on 7/17/2018.

View File

@ -1,4 +1,4 @@
package org.baeldung.primary; package com.baeldung.primary;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.primary; package com.baeldung.primary;
/** /**
* Created by Gebruiker on 7/19/2018. * Created by Gebruiker on 7/19/2018.

View File

@ -1,4 +1,4 @@
package org.baeldung.primary; package com.baeldung.primary;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@ -1,4 +1,4 @@
package org.baeldung.primary; package com.baeldung.primary;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;

View File

@ -1,4 +1,4 @@
package org.baeldung.profiles; package com.baeldung.profiles;
public interface DatasourceConfig { public interface DatasourceConfig {
void setup(); void setup();

View File

@ -1,4 +1,4 @@
package org.baeldung.profiles; package com.baeldung.profiles;
import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.profiles; package com.baeldung.profiles;
import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.profiles; package com.baeldung.profiles;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;

View File

@ -1,11 +1,11 @@
package org.baeldung.profiles; package com.baeldung.profiles;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
@Configuration @Configuration
@ComponentScan("org.baeldung.profiles") @ComponentScan("com.baeldung.profiles")
@PropertySource(value = "classpath:application.properties") @PropertySource(value = "classpath:application.properties")
public class SpringProfilesConfig { public class SpringProfilesConfig {

View File

@ -0,0 +1,5 @@
package com.baeldung.sample;
public class Bar {
}

View File

@ -0,0 +1,5 @@
package com.baeldung.sample;
public class Foo {
}

View File

@ -1,4 +1,4 @@
package org.baeldung.sampleabstract; package com.baeldung.sampleabstract;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,4 +1,4 @@
package org.baeldung.sampleabstract; package com.baeldung.sampleabstract;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.sampleabstract; package com.baeldung.sampleabstract;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
@ -6,7 +6,7 @@ import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
@ComponentScan(basePackages = "org.baeldung.sampleabstract") @ComponentScan(basePackages = "com.baeldung.sampleabstract")
public class DemoApp { public class DemoApp {

View File

@ -1,4 +1,4 @@
package org.baeldung.sampleabstract; package com.baeldung.sampleabstract;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.sampleabstract; package com.baeldung.sampleabstract;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.scopes; package com.baeldung.scopes;
public class HelloMessageGenerator { public class HelloMessageGenerator {

View File

@ -1,4 +1,4 @@
package org.baeldung.scopes; package com.baeldung.scopes;
public class Person { public class Person {
private String name; private String name;

View File

@ -1,4 +1,4 @@
package org.baeldung.scopes; package com.baeldung.scopes;
import javax.annotation.Resource; import javax.annotation.Resource;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.config; package com.baeldung.spring.config;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.config; package com.baeldung.spring.config;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration @Configuration
@ComponentScan("org.baeldung.core") @ComponentScan("com.baeldung.core")
public class CoreConfig implements WebMvcConfigurer { public class CoreConfig implements WebMvcConfigurer {
public CoreConfig() { public CoreConfig() {

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.config; package com.baeldung.spring.config;
import java.util.Set; import java.util.Set;
@ -26,7 +26,7 @@ public class MainWebAppInitializer implements WebApplicationInitializer
// Create the 'root' Spring application context // Create the 'root' Spring application context
final AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext(); final AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext();
root.scan("org.baeldung.spring.config"); root.scan("com.baeldung.spring.config");
// root.getEnvironment().setDefaultProfiles("embedded"); // root.getEnvironment().setDefaultProfiles("embedded");
sc.addListener(new ContextLoaderListener(root)); sc.addListener(new ContextLoaderListener(root));

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.config; package com.baeldung.spring.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring.config; package com.baeldung.spring.config;
import java.util.Properties; import java.util.Properties;
@ -20,7 +20,7 @@ import com.google.common.base.Preconditions;
// @Configuration // @Configuration
@EnableTransactionManagement @EnableTransactionManagement
@PropertySource({ "classpath:persistence-mysql.properties" }) @PropertySource({ "classpath:persistence-mysql.properties" })
@ComponentScan({ "org.baeldung.persistence" }) @ComponentScan({ "com.baeldung.persistence" })
public class PersistenceConfig { public class PersistenceConfig {
@Autowired @Autowired
@ -34,7 +34,7 @@ public class PersistenceConfig {
public LocalSessionFactoryBean sessionFactory() { public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(restDataSource()); sessionFactory.setDataSource(restDataSource());
sessionFactory.setPackagesToScan(new String[] { "org.baeldung.spring.persistence.model" }); sessionFactory.setPackagesToScan(new String[] { "com.baeldung.spring.persistence.model" });
sessionFactory.setHibernateProperties(hibernateProperties()); sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory; return sessionFactory;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.asynchronous; package com.baeldung.springevents.asynchronous;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
@ -8,7 +8,7 @@ import org.springframework.context.event.SimpleApplicationEventMulticaster;
import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.core.task.SimpleAsyncTaskExecutor;
@Configuration @Configuration
@ComponentScan("org.baeldung.springevents.synchronous") @ComponentScan("com.baeldung.springevents.synchronous")
public class AsynchronousSpringEventsConfig { public class AsynchronousSpringEventsConfig {
@Bean(name = "applicationEventMulticaster") @Bean(name = "applicationEventMulticaster")

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.context.event.ContextStartedEvent; import org.springframework.context.event.ContextStartedEvent;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.ContextRefreshedEvent;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisher;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
public class GenericSpringEvent<T> { public class GenericSpringEvent<T> {

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.lang.NonNull; import org.springframework.lang.NonNull;

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
class GenericStringSpringAppEvent extends GenericSpringAppEvent<String> { class GenericStringSpringAppEvent extends GenericSpringAppEvent<String> {

View File

@ -1,4 +1,4 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
public class GenericStringSpringEvent extends GenericSpringEvent<String> { public class GenericStringSpringEvent extends GenericSpringEvent<String> {

View File

@ -1,10 +1,10 @@
package org.baeldung.springevents.synchronous; package com.baeldung.springevents.synchronous;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
@ComponentScan("org.baeldung.springevents.synchronous") @ComponentScan("com.baeldung.springevents.synchronous")
public class SynchronousSpringEventsConfig { public class SynchronousSpringEventsConfig {
} }

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,9 +1,9 @@
package org.baeldung.startup; package com.baeldung.startup;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
@ComponentScan("org.baeldung.startup") @ComponentScan("com.baeldung.startup")
public class SpringStartupConfig { public class SpringStartupConfig {
} }

View File

@ -1,4 +1,4 @@
package org.baeldung.startup; package com.baeldung.startup;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -1,5 +0,0 @@
package org.baeldung.autowire.sample;
public class FooDAO {
}

View File

@ -1,6 +0,0 @@
@NonNullApi
@NonNullFields
package org.baeldung.nullibility;
import org.springframework.lang.NonNullApi;
import org.springframework.lang.NonNullFields;

View File

@ -1,5 +0,0 @@
package org.baeldung.sample;
public class Bar {
}

View File

@ -1,5 +0,0 @@
package org.baeldung.sample;
public class Foo {
}

View File

@ -4,12 +4,12 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd"> http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="ship" class="org.baeldung.bean.injection.Ship"> <bean id="ship" class="com.baeldung.bean.injection.Ship">
<constructor-arg> <constructor-arg>
<ref bean="helm"/> <ref bean="helm"/>
</constructor-arg> </constructor-arg>
</bean> </bean>
<bean id="helm" class="org.baeldung.bean.injection.Helm"/> <bean id="helm" class="com.baeldung.bean.injection.Helm"/>
</beans> </beans>

View File

@ -4,11 +4,11 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd"> http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="ship" class="org.baeldung.bean.injection.Ship"> <bean id="ship" class="com.baeldung.bean.injection.Ship">
<property name="helm"> <property name="helm">
<ref bean="helm"/> <ref bean="helm"/>
</property> </property>
</bean> </bean>
<bean id="helm" class="org.baeldung.bean.injection.Helm"/> <bean id="helm" class="com.baeldung.bean.injection.Helm"/>
</beans> </beans>

View File

@ -4,7 +4,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd" http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
> >
<bean id="employeeDao" class="org.baeldung.jdbc.EmployeeDAO"> <bean id="employeeDao" class="com.baeldung.jdbc.EmployeeDAO">
<property name="dataSource" ref="dataSource"/> <property name="dataSource" ref="dataSource"/>
</bean> </bean>

View File

@ -3,8 +3,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="personSingleton" class="org.baeldung.scopes.Person" scope="singleton"/> <bean id="personSingleton" class="com.baeldung.scopes.Person" scope="singleton"/>
<bean id="personPrototype" class="org.baeldung.scopes.Person" scope="prototype"/> <bean id="personPrototype" class="com.baeldung.scopes.Person" scope="prototype"/>
</beans> </beans>

View File

@ -6,10 +6,10 @@
> >
<beans profile="dev"> <beans profile="dev">
<bean id="devDatasourceConfig" class="org.baeldung.profiles.DevDatasourceConfig"/> <bean id="devDatasourceConfig" class="com.baeldung.profiles.DevDatasourceConfig"/>
</beans> </beans>
<beans profile="production"> <beans profile="production">
<bean id="productionDatasourceConfig" class="org.baeldung.profiles.ProductionDatasourceConfig"/> <bean id="productionDatasourceConfig" class="com.baeldung.profiles.ProductionDatasourceConfig"/>
</beans> </beans>
</beans> </beans>

View File

@ -4,13 +4,13 @@
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="initMethodExampleBean" <bean id="initMethodExampleBean"
class="org.baeldung.startup.InitMethodExampleBean" class="com.baeldung.startup.InitMethodExampleBean"
scope="prototype" scope="prototype"
init-method="init"> init-method="init">
</bean> </bean>
<bean id="allStrategiesExampleBean" <bean id="allStrategiesExampleBean"
class="org.baeldung.startup.AllStrategiesExampleBean" class="com.baeldung.startup.AllStrategiesExampleBean"
init-method="init"> init-method="init">
</bean> </bean>
</beans> </beans>

View File

@ -1,4 +1,4 @@
package org.baeldung.autowire.sample; package com.baeldung.autowire.sample;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;

View File

@ -1,6 +1,6 @@
package org.baeldung.bean.injection; package com.baeldung.bean.injection;
import org.baeldung.bean.config.ConstructorBasedShipConfig; import com.baeldung.bean.config.ConstructorBasedShipConfig;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;

View File

@ -1,4 +1,4 @@
package org.baeldung.bean.injection; package com.baeldung.bean.injection;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;

View File

@ -1,6 +1,6 @@
package org.baeldung.bean.injection; package com.baeldung.bean.injection;
import org.baeldung.bean.config.SetterBasedShipConfig; import com.baeldung.bean.config.SetterBasedShipConfig;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;

View File

@ -1,4 +1,4 @@
package org.baeldung.bean.injection; package com.baeldung.bean.injection;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import java.io.Serializable; import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.notNullValue;

View File

@ -1,4 +1,4 @@
package org.baeldung.customannotation; package com.baeldung.customannotation;
import java.io.Serializable; import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.baeldung.customscope; package com.baeldung.customscope;
import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.not;
@ -46,7 +46,7 @@ public class TenantScopeIntegrationTest {
public final void whenComponentScan_thenContextContainsFooAndBar() { public final void whenComponentScan_thenContextContainsFooAndBar() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
try { try {
ctx.scan("org.baeldung.customscope"); ctx.scan("com.baeldung.customscope");
ctx.refresh(); ctx.refresh();
TenantBean foo = (TenantBean) ctx.getBean("foo", TenantBean.class); TenantBean foo = (TenantBean) ctx.getBean("foo", TenantBean.class);

Some files were not shown because too many files have changed in this diff Show More