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:
Mark Paluch
2017-03-15 13:33:19 +01:00
parent 52b7f0f58d
commit dce904d15e
5 changed files with 12 additions and 8 deletions

View File

@@ -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.
*/

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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";

View File

@@ -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();