Formatting

pull/7164/head
Phillip Webb 8 years ago
parent f2b0fa284e
commit a2315378d4

@ -268,9 +268,7 @@ public class CacheProperties {
private String spec;
@Deprecated
@DeprecatedConfigurationProperty(
reason = "Caffeine will supersede the Guava support in Spring Boot 2.0",
replacement = "spring.cache.caffeine.spec")
@DeprecatedConfigurationProperty(reason = "Caffeine will supersede the Guava support in Spring Boot 2.0", replacement = "spring.cache.caffeine.spec")
public String getSpec() {
return this.spec;
}

@ -69,8 +69,7 @@ public enum CacheType {
/**
* Guava backed caching.
*/
@Deprecated
GUAVA,
@Deprecated GUAVA,
/**
* Simple in-memory caching.

@ -205,8 +205,8 @@ public class MongoProperties {
try {
if (hasCustomAddress() || hasCustomCredentials()) {
if (this.uri != null) {
throw new IllegalStateException("Invalid mongo configuration, " +
"either uri or host/port/credentials must be specified");
throw new IllegalStateException("Invalid mongo configuration, "
+ "either uri or host/port/credentials must be specified");
}
if (options == null) {
options = MongoClientOptions.builder().build();

@ -134,8 +134,8 @@ public class MongoPropertiesTests {
properties.setUsername("user");
properties.setPassword("secret".toCharArray());
this.thrown.expect(IllegalStateException.class);
this.thrown.expectMessage("Invalid mongo configuration, " +
"either uri or host/port/credentials must be specified");
this.thrown.expectMessage("Invalid mongo configuration, "
+ "either uri or host/port/credentials must be specified");
properties.createMongoClient(null, null);
}
@ -146,8 +146,8 @@ public class MongoPropertiesTests {
properties.setHost("localhost");
properties.setPort(4567);
this.thrown.expect(IllegalStateException.class);
this.thrown.expectMessage("Invalid mongo configuration, " +
"either uri or host/port/credentials must be specified");
this.thrown.expectMessage("Invalid mongo configuration, "
+ "either uri or host/port/credentials must be specified");
properties.createMongoClient(null, null);
}

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import java.sql.Date;
import java.util.Arrays;
import java.util.List;
@ -18,17 +17,11 @@ import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Author extends TableImpl<Record> {
@ -50,32 +43,38 @@ public class Author extends TableImpl<Record> {
/**
* The column <code>PUBLIC.AUTHOR.ID</code>.
*/
public final TableField<Record, Integer> ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<Record, Integer> ID = createField("ID",
org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>PUBLIC.AUTHOR.FIRST_NAME</code>.
*/
public final TableField<Record, String> FIRST_NAME = createField("FIRST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50), this, "");
public final TableField<Record, String> FIRST_NAME = createField("FIRST_NAME",
org.jooq.impl.SQLDataType.VARCHAR.length(50), this, "");
/**
* The column <code>PUBLIC.AUTHOR.LAST_NAME</code>.
*/
public final TableField<Record, String> LAST_NAME = createField("LAST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this, "");
public final TableField<Record, String> LAST_NAME = createField("LAST_NAME",
org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this, "");
/**
* The column <code>PUBLIC.AUTHOR.DATE_OF_BIRTH</code>.
*/
public final TableField<Record, Date> DATE_OF_BIRTH = createField("DATE_OF_BIRTH", org.jooq.impl.SQLDataType.DATE, this, "");
public final TableField<Record, Date> DATE_OF_BIRTH = createField("DATE_OF_BIRTH",
org.jooq.impl.SQLDataType.DATE, this, "");
/**
* The column <code>PUBLIC.AUTHOR.YEAR_OF_BIRTH</code>.
*/
public final TableField<Record, Integer> YEAR_OF_BIRTH = createField("YEAR_OF_BIRTH", org.jooq.impl.SQLDataType.INTEGER, this, "");
public final TableField<Record, Integer> YEAR_OF_BIRTH = createField("YEAR_OF_BIRTH",
org.jooq.impl.SQLDataType.INTEGER, this, "");
/**
* The column <code>PUBLIC.AUTHOR.DISTINGUISHED</code>.
*/
public final TableField<Record, Byte> DISTINGUISHED = createField("DISTINGUISHED", org.jooq.impl.SQLDataType.TINYINT, this, "");
public final TableField<Record, Byte> DISTINGUISHED = createField("DISTINGUISHED",
org.jooq.impl.SQLDataType.TINYINT, this, "");
/**
* Create a <code>PUBLIC.AUTHOR</code> table reference

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import java.util.Arrays;
import java.util.List;
@ -18,17 +17,11 @@ import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Book extends TableImpl<Record> {
@ -50,27 +43,32 @@ public class Book extends TableImpl<Record> {
/**
* The column <code>PUBLIC.BOOK.ID</code>.
*/
public final TableField<Record, Integer> ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<Record, Integer> ID = createField("ID",
org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>PUBLIC.BOOK.AUTHOR_ID</code>.
*/
public final TableField<Record, Integer> AUTHOR_ID = createField("AUTHOR_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<Record, Integer> AUTHOR_ID = createField("AUTHOR_ID",
org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>PUBLIC.BOOK.TITLE</code>.
*/
public final TableField<Record, String> TITLE = createField("TITLE", org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, "");
public final TableField<Record, String> TITLE = createField("TITLE",
org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, "");
/**
* The column <code>PUBLIC.BOOK.PUBLISHED_IN</code>.
*/
public final TableField<Record, Integer> PUBLISHED_IN = createField("PUBLISHED_IN", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<Record, Integer> PUBLISHED_IN = createField("PUBLISHED_IN",
org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>PUBLIC.BOOK.LANGUAGE_ID</code>.
*/
public final TableField<Record, Integer> LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<Record, Integer> LANGUAGE_ID = createField("LANGUAGE_ID",
org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* Create a <code>PUBLIC.BOOK</code> table reference
@ -123,7 +121,8 @@ public class Book extends TableImpl<Record> {
*/
@Override
public List<ForeignKey<Record, ?>> getReferences() {
return Arrays.<ForeignKey<Record, ?>>asList(Keys.FK_BOOK_AUTHOR, Keys.FK_BOOK_LANGUAGE);
return Arrays.<ForeignKey<Record, ?>>asList(Keys.FK_BOOK_AUTHOR,
Keys.FK_BOOK_LANGUAGE);
}
/**

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import java.util.Arrays;
import java.util.List;
@ -17,17 +16,11 @@ import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class BookStore extends TableImpl<Record> {
@ -49,7 +42,8 @@ public class BookStore extends TableImpl<Record> {
/**
* The column <code>PUBLIC.BOOK_STORE.NAME</code>.
*/
public final TableField<Record, String> NAME = createField("NAME", org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, "");
public final TableField<Record, String> NAME = createField("NAME",
org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, "");
/**
* Create a <code>PUBLIC.BOOK_STORE</code> table reference

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import java.util.Arrays;
import java.util.List;
@ -18,17 +17,11 @@ import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class BookToBookStore extends TableImpl<Record> {
@ -50,17 +43,20 @@ public class BookToBookStore extends TableImpl<Record> {
/**
* The column <code>PUBLIC.BOOK_TO_BOOK_STORE.NAME</code>.
*/
public final TableField<Record, String> NAME = createField("NAME", org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, "");
public final TableField<Record, String> NAME = createField("NAME",
org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, "");
/**
* The column <code>PUBLIC.BOOK_TO_BOOK_STORE.BOOK_ID</code>.
*/
public final TableField<Record, Integer> BOOK_ID = createField("BOOK_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<Record, Integer> BOOK_ID = createField("BOOK_ID",
org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>PUBLIC.BOOK_TO_BOOK_STORE.STOCK</code>.
*/
public final TableField<Record, Integer> STOCK = createField("STOCK", org.jooq.impl.SQLDataType.INTEGER, this, "");
public final TableField<Record, Integer> STOCK = createField("STOCK",
org.jooq.impl.SQLDataType.INTEGER, this, "");
/**
* Create a <code>PUBLIC.BOOK_TO_BOOK_STORE</code> table reference
@ -113,7 +109,8 @@ public class BookToBookStore extends TableImpl<Record> {
*/
@Override
public List<ForeignKey<Record, ?>> getReferences() {
return Arrays.<ForeignKey<Record, ?>>asList(Keys.FK_B2BS_BOOK_STORE, Keys.FK_B2BS_BOOK);
return Arrays.<ForeignKey<Record, ?>>asList(Keys.FK_B2BS_BOOK_STORE,
Keys.FK_B2BS_BOOK);
}
/**

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -13,17 +12,11 @@ import javax.annotation.Generated;
import org.jooq.Schema;
import org.jooq.impl.CatalogImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DefaultCatalog extends CatalogImpl {
@ -54,7 +47,6 @@ public class DefaultCatalog extends CatalogImpl {
}
private final List<Schema> getSchemas0() {
return Arrays.<Schema>asList(
Public.PUBLIC);
return Arrays.<Schema>asList(Public.PUBLIC);
}
}

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import javax.annotation.Generated;
import org.jooq.ForeignKey;
@ -11,18 +10,12 @@ import org.jooq.Record;
import org.jooq.UniqueKey;
import org.jooq.impl.AbstractKeys;
/**
* A class modelling foreign key relationships between tables of the <code>PUBLIC</code>
* schema
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Keys {
@ -30,7 +23,6 @@ public class Keys {
// IDENTITY definitions
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// UNIQUE and PRIMARY KEY definitions
// -------------------------------------------------------------------------
@ -55,17 +47,32 @@ public class Keys {
// -------------------------------------------------------------------------
private static class UniqueKeys0 extends AbstractKeys {
public static final UniqueKey<Record> CONSTRAINT_C = createUniqueKey(Language.LANGUAGE, "CONSTRAINT_C", Language.LANGUAGE.ID);
public static final UniqueKey<Record> CONSTRAINT_7 = createUniqueKey(Author.AUTHOR, "CONSTRAINT_7", Author.AUTHOR.ID);
public static final UniqueKey<Record> CONSTRAINT_1 = createUniqueKey(Book.BOOK, "CONSTRAINT_1", Book.BOOK.ID);
public static final UniqueKey<Record> CONSTRAINT_F = createUniqueKey(BookStore.BOOK_STORE, "CONSTRAINT_F", BookStore.BOOK_STORE.NAME);
public static final UniqueKey<Record> CONSTRAINT_2 = createUniqueKey(BookToBookStore.BOOK_TO_BOOK_STORE, "CONSTRAINT_2", BookToBookStore.BOOK_TO_BOOK_STORE.NAME, BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID);
public static final UniqueKey<Record> CONSTRAINT_C = createUniqueKey(
Language.LANGUAGE, "CONSTRAINT_C", Language.LANGUAGE.ID);
public static final UniqueKey<Record> CONSTRAINT_7 = createUniqueKey(
Author.AUTHOR, "CONSTRAINT_7", Author.AUTHOR.ID);
public static final UniqueKey<Record> CONSTRAINT_1 = createUniqueKey(Book.BOOK,
"CONSTRAINT_1", Book.BOOK.ID);
public static final UniqueKey<Record> CONSTRAINT_F = createUniqueKey(
BookStore.BOOK_STORE, "CONSTRAINT_F", BookStore.BOOK_STORE.NAME);
public static final UniqueKey<Record> CONSTRAINT_2 = createUniqueKey(
BookToBookStore.BOOK_TO_BOOK_STORE, "CONSTRAINT_2",
BookToBookStore.BOOK_TO_BOOK_STORE.NAME,
BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID);
}
private static class ForeignKeys0 extends AbstractKeys {
public static final ForeignKey<Record, Record> FK_BOOK_AUTHOR = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_7, Book.BOOK, "FK_BOOK_AUTHOR", Book.BOOK.AUTHOR_ID);
public static final ForeignKey<Record, Record> FK_BOOK_LANGUAGE = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_C, Book.BOOK, "FK_BOOK_LANGUAGE", Book.BOOK.LANGUAGE_ID);
public static final ForeignKey<Record, Record> FK_B2BS_BOOK_STORE = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_F, BookToBookStore.BOOK_TO_BOOK_STORE, "FK_B2BS_BOOK_STORE", BookToBookStore.BOOK_TO_BOOK_STORE.NAME);
public static final ForeignKey<Record, Record> FK_B2BS_BOOK = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_1, BookToBookStore.BOOK_TO_BOOK_STORE, "FK_B2BS_BOOK", BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID);
public static final ForeignKey<Record, Record> FK_BOOK_AUTHOR = createForeignKey(
sample.jooq.domain.Keys.CONSTRAINT_7, Book.BOOK, "FK_BOOK_AUTHOR",
Book.BOOK.AUTHOR_ID);
public static final ForeignKey<Record, Record> FK_BOOK_LANGUAGE = createForeignKey(
sample.jooq.domain.Keys.CONSTRAINT_C, Book.BOOK, "FK_BOOK_LANGUAGE",
Book.BOOK.LANGUAGE_ID);
public static final ForeignKey<Record, Record> FK_B2BS_BOOK_STORE = createForeignKey(
sample.jooq.domain.Keys.CONSTRAINT_F, BookToBookStore.BOOK_TO_BOOK_STORE,
"FK_B2BS_BOOK_STORE", BookToBookStore.BOOK_TO_BOOK_STORE.NAME);
public static final ForeignKey<Record, Record> FK_B2BS_BOOK = createForeignKey(
sample.jooq.domain.Keys.CONSTRAINT_1, BookToBookStore.BOOK_TO_BOOK_STORE,
"FK_B2BS_BOOK", BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID);
}
}

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import java.util.Arrays;
import java.util.List;
@ -17,17 +16,11 @@ import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Language extends TableImpl<Record> {
@ -49,17 +42,20 @@ public class Language extends TableImpl<Record> {
/**
* The column <code>PUBLIC.LANGUAGE.ID</code>.
*/
public final TableField<Record, Integer> ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<Record, Integer> ID = createField("ID",
org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>PUBLIC.LANGUAGE.CD</code>.
*/
public final TableField<Record, String> CD = createField("CD", org.jooq.impl.SQLDataType.CHAR.length(2).nullable(false), this, "");
public final TableField<Record, String> CD = createField("CD",
org.jooq.impl.SQLDataType.CHAR.length(2).nullable(false), this, "");
/**
* The column <code>PUBLIC.LANGUAGE.DESCRIPTION</code>.
*/
public final TableField<Record, String> DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR.length(50), this, "");
public final TableField<Record, String> DESCRIPTION = createField("DESCRIPTION",
org.jooq.impl.SQLDataType.VARCHAR.length(50), this, "");
/**
* Create a <code>PUBLIC.LANGUAGE</code> table reference

@ -3,7 +3,6 @@
*/
package sample.jooq.domain;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -14,17 +13,11 @@ import org.jooq.Catalog;
import org.jooq.Table;
import org.jooq.impl.SchemaImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Public extends SchemaImpl {
@ -67,7 +60,6 @@ public class Public extends SchemaImpl {
super("PUBLIC", null);
}
/**
* {@inheritDoc}
*/
@ -84,11 +76,7 @@ public class Public extends SchemaImpl {
}
private final List<Table<?>> getTables0() {
return Arrays.<Table<?>>asList(
Language.LANGUAGE,
Author.AUTHOR,
Book.BOOK,
BookStore.BOOK_STORE,
BookToBookStore.BOOK_TO_BOOK_STORE);
return Arrays.<Table<?>>asList(Language.LANGUAGE, Author.AUTHOR, Book.BOOK,
BookStore.BOOK_STORE, BookToBookStore.BOOK_TO_BOOK_STORE);
}
}

@ -3,20 +3,13 @@
*/
package sample.jooq.domain;
import javax.annotation.Generated;
/**
* Convenience access to all tables in PUBLIC
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.2"
},
comments = "This class is generated by jOOQ"
)
@Generated(value = { "http://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables {

@ -43,8 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = { SampleSecureApplication.class,
TestConfiguration.class })
@SpringBootTest(classes = { SampleSecureApplication.class, TestConfiguration.class })
public class SampleSecureApplicationTests {
@Autowired

@ -19,8 +19,7 @@ package org.springframework.boot.configurationsample.specific;
import org.springframework.boot.configurationsample.ConfigurationProperties;
/**
* Test that compilation fails if the same type is registered twice with the
* same prefix.
* Test that compilation fails if the same type is registered twice with the same prefix.
*
* @author Stephane Nicoll
*/

@ -226,8 +226,7 @@ public class PropertiesConfigurationFactory<T>
}
public void bindPropertiesToTarget() throws BindException {
Assert.state(this.propertySources != null,
"PropertySources should not be null");
Assert.state(this.propertySources != null, "PropertySources should not be null");
try {
if (this.logger.isTraceEnabled()) {
this.logger.trace("Property Sources: " + this.propertySources);
@ -262,7 +261,8 @@ public class PropertiesConfigurationFactory<T>
customizeBinder(dataBinder);
Iterable<String> relaxedTargetNames = getRelaxedTargetNames();
Set<String> names = getNames(relaxedTargetNames);
PropertyValues propertyValues = getPropertySourcesPropertyValues(names, relaxedTargetNames);
PropertyValues propertyValues = getPropertySourcesPropertyValues(names,
relaxedTargetNames);
dataBinder.bind(propertyValues);
if (this.validator != null) {
validate(dataBinder);

Loading…
Cancel
Save