Polish smoke tests' Gradle configuration

pull/19711/head
Andy Wilkinson 5 years ago
parent da6fe4aa6c
commit abbad9973a

@ -7,5 +7,6 @@ description = 'Spring Boot Actuator ActiveMQ smoke test'
dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-activemq')
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')
}

@ -10,8 +10,10 @@ dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-freemarker')
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-security')
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')
runtimeOnly 'org.jolokia:jolokia-core'
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')
testRuntimeOnly 'org.apache.httpcomponents:httpclient'
}

@ -11,6 +11,7 @@ dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-security')
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-validation')
runtimeOnly 'com.h2database:h2'
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')

@ -9,6 +9,7 @@ description = 'Spring Boot Atmosphere smoke test'
dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')
implementation 'org.atmosphere:atmosphere-runtime:2.4.14'
runtimeOnly 'org.webjars:atmosphere-javascript:2.3.4'
testImplementation enforcedPlatform(project(':spring-boot-project:spring-boot-dependencies'))

@ -8,6 +8,7 @@ description = 'Spring Boot Data JDBC smoke test'
dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-data-jdbc')
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')
runtimeOnly 'com.h2database:h2'
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')

@ -8,6 +8,7 @@ description = 'Spring Boot Data JPA smoke test'
dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-data-jpa')
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')
runtimeOnly 'com.h2database:h2'
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')

@ -7,6 +7,7 @@ description = 'Spring Boot Data LDAP smoke test'
dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-data-ldap')
runtimeOnly 'com.unboundid:unboundid-ldapsdk'
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')

@ -7,6 +7,7 @@ description = 'Spring Boot Data MongoDB smoke test'
dependencies {
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-data-mongodb')
runtimeOnly 'de.flapdoodle.embed:de.flapdoodle.embed.mongo'
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')

@ -15,5 +15,6 @@ dependencies {
runtimeOnly project(':spring-boot-project:spring-boot-starters:spring-boot-starter-jetty')
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')
testRuntimeOnly 'com.jayway.jsonpath:json-path'
}

@ -6,9 +6,9 @@ plugins {
description = 'Spring Boot Hibernate 5.2 smoke test'
configurations.all {
resolutionStrategy {
force 'org.hibernate:hibernate-core:5.2.17.Final'
}
resolutionStrategy {
force 'org.hibernate:hibernate-core:5.2.17.Final'
}
}
dependencies {

@ -12,5 +12,6 @@ dependencies {
}
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')
testRuntimeOnly 'org.apache.httpcomponents:httpclient'
}

@ -9,7 +9,6 @@ dependencies {
implementation(project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')) {
exclude module: 'spring-boot-starter-tomcat'
}
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-jetty')
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')

@ -1,43 +0,0 @@
// plugins {
// id 'java'
// id 'nu.studer.jooq' version '3.0.3'
// id 'org.springframework.boot.conventions'
// }
//
// description = 'Spring Boot JOOQ smoke test'
//
// dependencies {
// implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-jooq')
// jooqRuntime enforcedPlatform(project(':spring-boot-project:spring-boot-dependencies'))
// jooqRuntime 'com.h2database:h2'
// runtimeOnly 'com.h2database:h2'
//
// testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')
// }
//
// jooq {
// version = '3.12.3'
// smokeTest(sourceSets.main) {
// jdbc {
// driver = 'org.h2.Driver'
// url = 'jdbc:h2:~/springbootjooq'
// }
// generator {
// name = 'org.jooq.codegen.DefaultGenerator'
// database {
// name = 'org.jooq.meta.h2.H2Database'
// includes = '.*'
// inputSchema = 'PUBLIC'
// }
// strategy {
// // name = 'smoketest.jooq.util.TangleFreeGeneratorStrategy'
// }
// target {
// packageName = 'smoketest.jooq.domain'
// }
// generate {
// records = false
// }
// }
// }
// }

@ -1,157 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import java.sql.Date;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(value = { "https://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> {
private static final long serialVersionUID = 1187406915;
/**
* The reference instance of <code>PUBLIC.AUTHOR</code>
*/
public static final Author AUTHOR = new Author();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>PUBLIC.AUTHOR.ID</code>.
*/
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, "");
/**
* 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, "");
/**
* 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, "");
/**
* 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, "");
/**
* The column <code>PUBLIC.AUTHOR.DISTINGUISHED</code>.
*/
public final TableField<Record, Byte> DISTINGUISHED = createField("DISTINGUISHED",
org.jooq.impl.SQLDataType.TINYINT, this, "");
/**
* Create a <code>PUBLIC.AUTHOR</code> table reference
*/
public Author() {
this("AUTHOR", null);
}
/**
* Create an aliased <code>PUBLIC.AUTHOR</code> table reference
*/
public Author(String alias) {
this(alias, AUTHOR);
}
private Author(String alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private Author(String alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return Public.PUBLIC;
}
/**
* {@inheritDoc}
*/
@Override
public UniqueKey<Record> getPrimaryKey() {
return Keys.CONSTRAINT_7;
}
/**
* {@inheritDoc}
*/
@Override
public List<UniqueKey<Record>> getKeys() {
return Arrays.<UniqueKey<Record>>asList(Keys.CONSTRAINT_7);
}
/**
* {@inheritDoc}
*/
@Override
public Author as(String alias) {
return new Author(alias, this);
}
/**
* Rename this table
*/
@Override
public Author rename(String name) {
return new Author(name, null);
}
}

@ -1,160 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(value = { "https://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> {
private static final long serialVersionUID = 1176189796;
/**
* The reference instance of <code>PUBLIC.BOOK</code>
*/
public static final Book BOOK = new Book();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>PUBLIC.BOOK.ID</code>.
*/
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, "");
/**
* 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, "");
/**
* 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, "");
/**
* 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, "");
/**
* Create a <code>PUBLIC.BOOK</code> table reference
*/
public Book() {
this("BOOK", null);
}
/**
* Create an aliased <code>PUBLIC.BOOK</code> table reference
*/
public Book(String alias) {
this(alias, BOOK);
}
private Book(String alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private Book(String alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return Public.PUBLIC;
}
/**
* {@inheritDoc}
*/
@Override
public UniqueKey<Record> getPrimaryKey() {
return Keys.CONSTRAINT_1;
}
/**
* {@inheritDoc}
*/
@Override
public List<UniqueKey<Record>> getKeys() {
return Arrays.<UniqueKey<Record>>asList(Keys.CONSTRAINT_1);
}
/**
* {@inheritDoc}
*/
@Override
public List<ForeignKey<Record, ?>> getReferences() {
return Arrays.<ForeignKey<Record, ?>>asList(Keys.FK_BOOK_AUTHOR,
Keys.FK_BOOK_LANGUAGE);
}
/**
* {@inheritDoc}
*/
@Override
public Book as(String alias) {
return new Book(alias, this);
}
/**
* Rename this table
*/
@Override
public Book rename(String name) {
return new Book(name, null);
}
}

@ -1,118 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(value = { "https://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> {
private static final long serialVersionUID = -2132596210;
/**
* The reference instance of <code>PUBLIC.BOOK_STORE</code>
*/
public static final BookStore BOOK_STORE = new BookStore();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* 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, "");
/**
* Create a <code>PUBLIC.BOOK_STORE</code> table reference
*/
public BookStore() {
this("BOOK_STORE", null);
}
/**
* Create an aliased <code>PUBLIC.BOOK_STORE</code> table reference
*/
public BookStore(String alias) {
this(alias, BOOK_STORE);
}
private BookStore(String alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private BookStore(String alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return Public.PUBLIC;
}
/**
* {@inheritDoc}
*/
@Override
public List<UniqueKey<Record>> getKeys() {
return Arrays.<UniqueKey<Record>>asList(Keys.CONSTRAINT_F);
}
/**
* {@inheritDoc}
*/
@Override
public BookStore as(String alias) {
return new BookStore(alias, this);
}
/**
* Rename this table
*/
@Override
public BookStore rename(String name) {
return new BookStore(name, null);
}
}

@ -1,148 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(value = { "https://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> {
private static final long serialVersionUID = -1360744633;
/**
* The reference instance of <code>PUBLIC.BOOK_TO_BOOK_STORE</code>
*/
public static final BookToBookStore BOOK_TO_BOOK_STORE = new BookToBookStore();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* 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, "");
/**
* 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, "");
/**
* The column <code>PUBLIC.BOOK_TO_BOOK_STORE.STOCK</code>.
*/
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
*/
public BookToBookStore() {
this("BOOK_TO_BOOK_STORE", null);
}
/**
* Create an aliased <code>PUBLIC.BOOK_TO_BOOK_STORE</code> table reference
*/
public BookToBookStore(String alias) {
this(alias, BOOK_TO_BOOK_STORE);
}
private BookToBookStore(String alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private BookToBookStore(String alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return Public.PUBLIC;
}
/**
* {@inheritDoc}
*/
@Override
public UniqueKey<Record> getPrimaryKey() {
return Keys.CONSTRAINT_2;
}
/**
* {@inheritDoc}
*/
@Override
public List<UniqueKey<Record>> getKeys() {
return Arrays.<UniqueKey<Record>>asList(Keys.CONSTRAINT_2);
}
/**
* {@inheritDoc}
*/
@Override
public List<ForeignKey<Record, ?>> getReferences() {
return Arrays.<ForeignKey<Record, ?>>asList(Keys.FK_B2BS_BOOK_STORE,
Keys.FK_B2BS_BOOK);
}
/**
* {@inheritDoc}
*/
@Override
public BookToBookStore as(String alias) {
return new BookToBookStore(alias, this);
}
/**
* Rename this table
*/
@Override
public BookToBookStore rename(String name) {
return new BookToBookStore(name, null);
}
}

@ -1,69 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Schema;
import org.jooq.impl.CatalogImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(value = { "https://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DefaultCatalog extends CatalogImpl {
private static final long serialVersionUID = -1557925562;
/**
* The reference instance of <code></code>
*/
public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
/**
* The schema <code>PUBLIC</code>.
*/
public final Public PUBLIC = Public.PUBLIC;
/**
* No further instances allowed
*/
private DefaultCatalog() {
super("");
}
@Override
public final List<Schema> getSchemas() {
List result = new ArrayList();
result.addAll(getSchemas0());
return result;
}
private final List<Schema> getSchemas0() {
return Arrays.<Schema>asList(Public.PUBLIC);
}
}

@ -1,113 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import javax.annotation.Generated;
import org.jooq.ForeignKey;
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 = { "https://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Keys {
// -------------------------------------------------------------------------
// IDENTITY definitions
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// UNIQUE and PRIMARY KEY definitions
// -------------------------------------------------------------------------
public static final UniqueKey<Record> CONSTRAINT_C = UniqueKeys0.CONSTRAINT_C;
public static final UniqueKey<Record> CONSTRAINT_7 = UniqueKeys0.CONSTRAINT_7;
public static final UniqueKey<Record> CONSTRAINT_1 = UniqueKeys0.CONSTRAINT_1;
public static final UniqueKey<Record> CONSTRAINT_F = UniqueKeys0.CONSTRAINT_F;
public static final UniqueKey<Record> CONSTRAINT_2 = UniqueKeys0.CONSTRAINT_2;
// -------------------------------------------------------------------------
// FOREIGN KEY definitions
// -------------------------------------------------------------------------
public static final ForeignKey<Record, Record> FK_BOOK_AUTHOR = ForeignKeys0.FK_BOOK_AUTHOR;
public static final ForeignKey<Record, Record> FK_BOOK_LANGUAGE = ForeignKeys0.FK_BOOK_LANGUAGE;
public static final ForeignKey<Record, Record> FK_B2BS_BOOK_STORE = ForeignKeys0.FK_B2BS_BOOK_STORE;
public static final ForeignKey<Record, Record> FK_B2BS_BOOK = ForeignKeys0.FK_B2BS_BOOK;
// -------------------------------------------------------------------------
// [#1459] distribute members to avoid static initialisers > 64kb
// -------------------------------------------------------------------------
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);
}
private static class ForeignKeys0 extends AbstractKeys {
public static final ForeignKey<Record, Record> FK_BOOK_AUTHOR = createForeignKey(
Keys.CONSTRAINT_7, Book.BOOK, "FK_BOOK_AUTHOR",
Book.BOOK.AUTHOR_ID);
public static final ForeignKey<Record, Record> FK_BOOK_LANGUAGE = createForeignKey(
Keys.CONSTRAINT_C, Book.BOOK, "FK_BOOK_LANGUAGE",
Book.BOOK.LANGUAGE_ID);
public static final ForeignKey<Record, Record> FK_B2BS_BOOK_STORE = createForeignKey(
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(
Keys.CONSTRAINT_1, BookToBookStore.BOOK_TO_BOOK_STORE,
"FK_B2BS_BOOK", BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID);
}
}

@ -1,138 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(value = { "https://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> {
private static final long serialVersionUID = -1890716744;
/**
* The reference instance of <code>PUBLIC.LANGUAGE</code>
*/
public static final Language LANGUAGE = new Language();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>PUBLIC.LANGUAGE.ID</code>.
*/
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, "");
/**
* The column <code>PUBLIC.LANGUAGE.DESCRIPTION</code>.
*/
public final TableField<Record, String> DESCRIPTION = createField("DESCRIPTION",
org.jooq.impl.SQLDataType.VARCHAR.length(50), this, "");
/**
* Create a <code>PUBLIC.LANGUAGE</code> table reference
*/
public Language() {
this("LANGUAGE", null);
}
/**
* Create an aliased <code>PUBLIC.LANGUAGE</code> table reference
*/
public Language(String alias) {
this(alias, LANGUAGE);
}
private Language(String alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private Language(String alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return Public.PUBLIC;
}
/**
* {@inheritDoc}
*/
@Override
public UniqueKey<Record> getPrimaryKey() {
return Keys.CONSTRAINT_C;
}
/**
* {@inheritDoc}
*/
@Override
public List<UniqueKey<Record>> getKeys() {
return Arrays.<UniqueKey<Record>>asList(Keys.CONSTRAINT_C);
}
/**
* {@inheritDoc}
*/
@Override
public Language as(String alias) {
return new Language(alias, this);
}
/**
* Rename this table
*/
@Override
public Language rename(String name) {
return new Language(name, null);
}
}

@ -1,99 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Catalog;
import org.jooq.Table;
import org.jooq.impl.SchemaImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(value = { "https://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Public extends SchemaImpl {
private static final long serialVersionUID = 217498103;
/**
* The reference instance of <code>PUBLIC</code>
*/
public static final Public PUBLIC = new Public();
/**
* The table <code>PUBLIC.LANGUAGE</code>.
*/
public final Language LANGUAGE = Language.LANGUAGE;
/**
* The table <code>PUBLIC.AUTHOR</code>.
*/
public final Author AUTHOR = Author.AUTHOR;
/**
* The table <code>PUBLIC.BOOK</code>.
*/
public final Book BOOK = Book.BOOK;
/**
* The table <code>PUBLIC.BOOK_STORE</code>.
*/
public final BookStore BOOK_STORE = BookStore.BOOK_STORE;
/**
* The table <code>PUBLIC.BOOK_TO_BOOK_STORE</code>.
*/
public final BookToBookStore BOOK_TO_BOOK_STORE = BookToBookStore.BOOK_TO_BOOK_STORE;
/**
* No further instances allowed
*/
private Public() {
super("PUBLIC", null);
}
/**
* {@inheritDoc}
*/
@Override
public Catalog getCatalog() {
return DefaultCatalog.DEFAULT_CATALOG;
}
@Override
public final List<Table<?>> getTables() {
List result = new ArrayList();
result.addAll(getTables0());
return result;
}
private final List<Table<?>> getTables0() {
return Arrays.<Table<?>>asList(Language.LANGUAGE, Author.AUTHOR, Book.BOOK,
BookStore.BOOK_STORE, BookToBookStore.BOOK_TO_BOOK_STORE);
}
}

@ -1,57 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is generated by jOOQ
*/
package smoketest.jooq.domain;
import javax.annotation.Generated;
/**
* Convenience access to all tables in PUBLIC
*/
@Generated(value = { "https://www.jooq.org",
"jOOQ version:3.8.2" }, comments = "This class is generated by jOOQ")
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables {
/**
* The table <code>PUBLIC.LANGUAGE</code>.
*/
public static final Language LANGUAGE = Language.LANGUAGE;
/**
* The table <code>PUBLIC.AUTHOR</code>.
*/
public static final Author AUTHOR = Author.AUTHOR;
/**
* The table <code>PUBLIC.BOOK</code>.
*/
public static final Book BOOK = Book.BOOK;
/**
* The table <code>PUBLIC.BOOK_STORE</code>.
*/
public static final BookStore BOOK_STORE = BookStore.BOOK_STORE;
/**
* The table <code>PUBLIC.BOOK_TO_BOOK_STORE</code>.
*/
public static final BookToBookStore BOOK_TO_BOOK_STORE = BookToBookStore.BOOK_TO_BOOK_STORE;
}

@ -1,77 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package smoketest.jooq;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.jooq.DSLContext;
import org.jooq.Query;
import org.jooq.Record;
import org.jooq.Result;
import org.springframework.boot.CommandLineRunner;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Component;
import static smoketest.jooq.domain.Author.AUTHOR;
import static smoketest.jooq.domain.Book.BOOK;
@Component
public class JooqExamples implements CommandLineRunner {
private final DSLContext dsl;
private final JdbcTemplate jdbc;
public JooqExamples(DSLContext dsl, JdbcTemplate jdbc) {
this.dsl = dsl;
this.jdbc = jdbc;
}
@Override
public void run(String... args) throws Exception {
jooqFetch();
jooqSql();
}
private void jooqFetch() {
Result<Record> results = this.dsl.select().from(AUTHOR).fetch();
for (Record result : results) {
Integer id = result.getValue(AUTHOR.ID);
String firstName = result.getValue(AUTHOR.FIRST_NAME);
String lastName = result.getValue(AUTHOR.LAST_NAME);
System.out.println("jOOQ Fetch " + id + " " + firstName + " " + lastName);
}
}
private void jooqSql() {
Query query = this.dsl.select(BOOK.TITLE, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME).from(BOOK).join(AUTHOR)
.on(BOOK.AUTHOR_ID.equal(AUTHOR.ID)).where(BOOK.PUBLISHED_IN.equal(2015));
Object[] bind = query.getBindValues().toArray(new Object[0]);
List<String> list = this.jdbc.query(query.getSQL(), bind, new RowMapper<String>() {
@Override
public String mapRow(ResultSet rs, int rowNum) throws SQLException {
return rs.getString(1) + " : " + rs.getString(2) + " " + rs.getString(3);
}
});
System.out.println("jOOQ SQL " + list);
}
}

@ -1,29 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package smoketest.jooq;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SampleJooqApplication {
public static void main(String[] args) {
SpringApplication.run(SampleJooqApplication.class, args);
}
}

@ -1,33 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package smoketest.jooq.util;
import org.jooq.codegen.DefaultGeneratorStrategy;
import org.jooq.meta.Definition;
/**
* Custom {@link DefaultGeneratorStrategy} that doesn't produce tangled packages. Too
* simple for general use but solves false flags for our build.
*/
public class TangleFreeGeneratorStrategy extends DefaultGeneratorStrategy {
@Override
public String getJavaPackageName(Definition definition, Mode mode) {
return getTargetPackage();
}
}

@ -1,12 +0,0 @@
INSERT INTO language VALUES (1, 'EN', 'English');
INSERT INTO author VALUES (1, 'Greg', 'Turnquest', '1804-09-17', 1804, 1);
INSERT INTO author VALUES (2, 'Craig', 'Walls', '1804-09-18', 1804, 1);
INSERT INTO book VALUES (1, 1, 'Learning Spring Boot', 2015, 1);
INSERT INTO book VALUES (2, 2, 'Spring Boot in Action', 2015, 1);
INSERT INTO book_store VALUES ('Barnes & Noble');
INSERT INTO book_to_book_store VALUES ('Barnes & Noble', 1, 10);
INSERT INTO book_to_book_store VALUES ('Barnes & Noble', 2, 3);

@ -1,39 +0,0 @@
CREATE TABLE language (
id NUMBER(7) NOT NULL PRIMARY KEY,
cd CHAR(2) NOT NULL,
description VARCHAR2(50)
);
CREATE TABLE author (
id NUMBER(7) NOT NULL PRIMARY KEY,
first_name VARCHAR2(50),
last_name VARCHAR2(50) NOT NULL,
date_of_birth DATE,
year_of_birth NUMBER(7),
distinguished NUMBER(1)
);
CREATE TABLE book (
id NUMBER(7) NOT NULL PRIMARY KEY,
author_id NUMBER(7) NOT NULL,
title VARCHAR2(400) NOT NULL,
published_in NUMBER(7) NOT NULL,
language_id NUMBER(7) NOT NULL,
CONSTRAINT fk_book_author FOREIGN KEY (author_id) REFERENCES author(id),
CONSTRAINT fk_book_language FOREIGN KEY (language_id) REFERENCES language(id)
);
CREATE TABLE book_store (
name VARCHAR2(400) NOT NULL UNIQUE
);
CREATE TABLE book_to_book_store (
name VARCHAR2(400) NOT NULL,
book_id INTEGER NOT NULL,
stock INTEGER,
PRIMARY KEY(name, book_id),
CONSTRAINT fk_b2bs_book_store FOREIGN KEY (name) REFERENCES book_store (name) ON DELETE CASCADE,
CONSTRAINT fk_b2bs_book FOREIGN KEY (book_id) REFERENCES book (id) ON DELETE CASCADE
);

@ -1,42 +0,0 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package smoketest.jooq;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.system.CapturedOutput;
import org.springframework.boot.test.system.OutputCaptureExtension;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for {@link SampleJooqApplication}.
*/
@ExtendWith(OutputCaptureExtension.class)
class SampleJooqApplicationTests {
private static final String[] NO_ARGS = {};
@Test
void outputResults(CapturedOutput output) {
SampleJooqApplication.main(NO_ARGS);
assertThat(output).contains("jOOQ Fetch 1 Greg Turnquest").contains("jOOQ Fetch 2 Craig Walls")
.contains("jOOQ SQL [Learning Spring Boot : Greg Turnquest, Spring Boot in Action : Craig Walls]");
}
}

@ -15,12 +15,12 @@ dependencies {
test {
testLogging {
afterSuite { description, result ->
if (!description.parent) {
if (!result.testCount) {
throw new GradleException('No tests were executed')
}
}
afterSuite { description, result ->
if (!description.parent) {
if (!result.testCount) {
throw new GradleException('No tests were executed')
}
}
}
}
}

@ -13,12 +13,12 @@ dependencies {
test {
testLogging {
afterSuite { description, result ->
if (!description.parent) {
if (!result.testCount) {
throw new GradleException('No tests were executed')
}
}
afterSuite { description, result ->
if (!description.parent) {
if (!result.testCount) {
throw new GradleException('No tests were executed')
}
}
}
}
}

@ -7,8 +7,10 @@ description = 'Spring Boot Servlet smoke test'
dependencies {
compileOnly project(':spring-boot-project:spring-boot-starters:spring-boot-starter-tomcat')
implementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-security')
testImplementation project(':spring-boot-project:spring-boot-starters:spring-boot-starter-test')
testRuntimeOnly project(':spring-boot-project:spring-boot-starters:spring-boot-starter-tomcat')
}

@ -9,6 +9,7 @@ dependencies {
implementation(project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')) {
exclude module: 'spring-boot-starter-tomcat'
}
providedCompile platform(project(':spring-boot-project:spring-boot-dependencies'))
providedCompile 'jakarta.servlet:jakarta.servlet-api'

@ -11,7 +11,6 @@ dependencies {
runtimeOnly 'jaxen:jaxen'
runtimeOnly 'wsdl4j:wsdl4j'
if (JavaVersion.current().java11Compatible) {
runtimeOnly 'jakarta.activation:jakarta.activation-api'
runtimeOnly 'org.glassfish.jaxb:jaxb-runtime'

Loading…
Cancel
Save