DATACASS-401 - Polishing.
Add author tags. Extend years in license header. Add ticket references. Reformat code. Original pull request: #96.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2016 the original author or authors
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -64,6 +64,7 @@ import com.datastax.driver.core.Session;
|
||||
*
|
||||
* @author Matthew T. Adams
|
||||
* @author Mark Paluch
|
||||
* @author Mateusz Szymczak
|
||||
* @deprecated Will be removed with the next major release. Spring Data Cassandra is not the best place to apply
|
||||
* configuration defaults.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.config.xml;
|
||||
|
||||
import static org.springframework.cassandra.config.xml.ParsingUtils.addOptionalPropertyReference;
|
||||
import static org.springframework.cassandra.config.xml.ParsingUtils.*;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
@@ -32,6 +32,7 @@ import org.w3c.dom.Element;
|
||||
*
|
||||
* @author Matthew T. Adams
|
||||
* @author Mark Paluch
|
||||
* @author Mateusz Szymczak
|
||||
*/
|
||||
public class CassandraTemplateParser extends AbstractSingleBeanDefinitionParser {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2016 the original author or authors
|
||||
* Copyright 2013-2017 the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,7 +21,6 @@ import java.util.Collections;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.cassandra.config.xml.ParsingUtils;
|
||||
import org.springframework.core.annotation.AnnotationAttributes;
|
||||
import org.springframework.data.cassandra.config.DefaultBeanNames;
|
||||
import org.springframework.data.cassandra.mapping.Table;
|
||||
import org.springframework.data.cassandra.repository.CassandraRepository;
|
||||
@@ -40,6 +39,7 @@ import org.w3c.dom.Element;
|
||||
* @author Alex Shvid
|
||||
* @author Mark Paluch
|
||||
* @author Christoph Strobl
|
||||
* @author Mateusz Szymczak
|
||||
*/
|
||||
public class CassandraRepositoryConfigurationExtension extends RepositoryConfigurationExtensionSupport {
|
||||
|
||||
|
||||
@@ -120,8 +120,9 @@ public @interface EnableCassandraRepositories {
|
||||
Class<?> repositoryBaseClass() default DefaultRepositoryBaseClass.class;
|
||||
|
||||
/**
|
||||
* Configures the name of the {@link CassandraTemplate} bean to be used with the repositories detected.
|
||||
* Defaults to {@link DefaultBeanNames#DATA_TEMPLATE}
|
||||
* Configures the name of the {@link CassandraTemplate} bean to be used with the repositories detected. Defaults to
|
||||
* {@link DefaultBeanNames#DATA_TEMPLATE}
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String cassandraTemplateRef() default "cassandraTemplate";
|
||||
|
||||
@@ -35,12 +35,13 @@ import com.datastax.driver.core.Session;
|
||||
* Unit tests for {@link CassandraMappingBeanFactoryPostProcessor}.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @author Mateusz Szymczak
|
||||
*/
|
||||
public class CassandraMappingBeanFactoryPostProcessorUnitTests {
|
||||
|
||||
@Rule public final ExpectedException expectedException = ExpectedException.none();
|
||||
|
||||
@Test // DATACASS-290
|
||||
@Test // DATACASS-290, DATACASS-401
|
||||
public void clusterRegistrationTriggersDefaultBeanRegistration() {
|
||||
|
||||
GenericXmlApplicationContext context = new GenericXmlApplicationContext();
|
||||
@@ -52,7 +53,7 @@ public class CassandraMappingBeanFactoryPostProcessorUnitTests {
|
||||
assertThat(context.getBeanNamesForType(CassandraConverter.class), hasItemInArray(DefaultBeanNames.CONVERTER));
|
||||
}
|
||||
|
||||
@Test // DATACASS-290
|
||||
@Test // DATACASS-290, DATACASS-401
|
||||
public void MappingAndConverterRegistrationTriggersDefaultBeanRegistration() {
|
||||
|
||||
GenericXmlApplicationContext context = new GenericXmlApplicationContext();
|
||||
|
||||
Reference in New Issue
Block a user