beans.factory.UnsatisfiedDependencyException: Error creating bean with name - spring-boot

Errors for repository and service:
Error creating bean with name 'rimeService' defined in file [...]: Unsatisfied dependency expressed through constructor parameter 0;
nested exception is java.lang.NoClassDefFoundError: kotlin/reflect/full/KClasses
Error creating bean with name 'rimeRepository': Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError: kotlin/reflect/full/KClasses
RimeService:
#Service
class RimeService(private val repository: RimeRepository) {
fun findRimes(character: String) = repository.findByCharactersContains(character)
}
RimeRepository:
#Repository
interface RimeRepository: JpaRepository<Rime, Int> {
fun findByCharactersContains(character: String): List<Rime>
}
Controller:
#Controller
#RequestMapping("/rimes")
class RimeController(private val service: RimeService) {
#GetMapping("/{character}")
fun getByCharacter(#PathVariable character: String) = service.findRimes(character)
}
dependencies:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'mysql:mysql-connector-java'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.security:spring-security-test'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
In addition, the class and methods in controller is grayed out in Intelij, which means those are never used.
Please let me know if there's anything wrong with my configuration.
Thank you.

Related

Error creating bean with name org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration (Using Gradle)

Building jar file works through the terminal computer path % ./gradlew build, and application runs computer path % java -jar name.jar.
Why not through IntelliJ?
*Secondary Issue -
When I try to upload the jar file built through the terminal to AWS Beanstalk I get a validation error.
*Primary Issue -
The application runs in IntelliJ.
After I have completed the Project Structure setup, and the Build Artifacts execution. The new .jar file fails to run,
throwing the exception below.
Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
build.gradle:
plugins {
id 'org.springframework.boot' version '2.6.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'application'
}
group = 'com.example'
version = 'api'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
runtimeOnly 'mysql:mysql-connector-java'
}
test {
useJUnitPlatform()
}
mainClassName = 'com.example.name.applicationame'
task fatJar(type: Jar) {
bootJar {
launchScript()
}
manifest {
attributes 'Main-Class': "${mainClassName}"
duplicatesStrategy = 'include'
}
archiveBaseName = "name"
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/name?useSSL=true
spring.datasource.username=root
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Thanks!

Error creating mongock bean when deploying on docker

I am using Mongck to migrate data in my Spring Boot application. Spring Boot application runs perfectly locally. But when running on docker, the following error occurs:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongockInitializingBeanRunner' defined in class path resource [vn/vnpt/icode/svc/config/config/MongockConfig.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/mongodb/MongoDatabaseFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar!/:5.2.2.RELEASE]
see the full logs here
Here is the dependencies in build.gradle file:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'javax.xml.bind:jaxb-api'
implementation 'com.github.cloudyrock.mongock:mongock-bom:4.3.7'
implementation 'com.github.cloudyrock.mongock:mongodb-springdata-v3-driver:4.3.7'
implementation 'com.github.cloudyrock.mongock:mongock-spring-v5:4.3.7'
implementation 'com.hazelcast:hazelcast-kubernetes:2.0'
implementation 'com.hazelcast:hazelcast-spring'
implementation 'org.springframework.cloud:spring-cloud-starter-stream-kafka:3.0.1.RELEASE'
// implementation 'org.apache.poi:poi-ooxml:4.1.1'
implementation 'org.apache.commons:commons-collections4:4.1'
implementation 'com.google.code.gson:gson'
implementation 'org.json:json:20201115'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
and the content of MongockConfig class:
#Bean
public MongockSpring5.MongockInitializingBeanRunner mongockInitializingBeanRunner(ApplicationContext springContext, MongoTemplate mongoTemplate) {
boolean migrationsEnabled = mongoEnabled;
return MongockSpring5.builder()
.setDriver(SpringDataMongoV3Driver.withDefaultLock(mongoTemplate))
.addChangeLogsScanPackages(List.of(changeLogsScanPackage))
.setSpringContext(springContext)
.setEnabled(migrationsEnabled)
.buildInitializingBeanRunner();
}
I don't understand why it doesn't work when run on docker. Is my mongockInitializingBeanRunner method incorrect.
Someone please help me
As discussed in this Github issue, the issue was resolved by upgrading to version 4.3.7.

Quarkus - Unsatisfied dependency for type org.eclipse.microprofile.jwt

I was trying to implement the JWT token for one my Quarkus application but somehow getting an exception - Unsatisfied dependency for type org.eclipse.microprofile.jwt.JsonWebToken and qualifiers [#Default]
My Quarkus application is fairly simple and having one rest endpoint -
#Path("/jwt")
#RequestScoped
public class JWTRestController {
#Inject
JsonWebToken jwt;
#GET()
#Path("permit-all")
#PermitAll
#Produces(MediaType.TEXT_PLAIN)
public String hello(#Context SecurityContext ctx) {
Principal caller = ctx.getUserPrincipal();
String name = caller == null ? "anonymous" : caller.getName();
String helloReply = String.format("hello + %s, isSecure: %s, authScheme: %s", name, ctx.isSecure(), ctx.getAuthenticationScheme());
return helloReply;
}
}
But when i try to run my quarkus application -
gradlew quarkusDev
Log stacktrace
> Task :quarkusDev
Port 5005 in use, not starting in debug mode
2020-04-05 15:57:49,789 INFO [org.jbo.threads] (main) JBoss Threads version 3.0.1.Final
2020-04-05 15:57:50,158 ERROR [io.qua.dev.DevModeMain] (main) Failed to start Quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.eclipse.microprofile.jwt.JsonWebToken and qual
ifiers [#Default]
- java member: com.jhooq.JWTRestController#jwt
- declared on CLASS bean [types=[com.jhooq.JWTRestController, java.lang.Object], qualifiers=[#Default, #Any], target=com.jhooq.JWTRestController]
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:910)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:232)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:130)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:291)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Am i really missing something here?
Here is my build.gradle
plugins {
id 'java'
id 'io.quarkus'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-resteasy'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured'
testImplementation 'io.quarkus:quarkus-smallrye-jwt'
testImplementation 'io.quarkus:quarkus-resteasy-jsonb'
implementation 'org.eclipse.microprofile.jwt:microprofile-jwt-auth-api:1.1.1'
}
group 'com.jhooq'
version '1.0.0-SNAPSHOT'
compileJava {
options.compilerArgs << '-parameters'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
The problem lies here:
testImplementation 'io.quarkus:quarkus-smallrye-jwt'
testImplementation 'io.quarkus:quarkus-resteasy-jsonb'
implementation 'org.eclipse.microprofile.jwt:microprofile-jwt-auth-api:1.1.1'
The quarkus-smallrye-jwt and quarkus-resteasy-jsonb dependencies are part of the application, not part of tests. These must be implementation, not testImplementation.
At the same time, you can remove implementation 'org.eclipse.microprofile.jwt:microprofile-jwt-auth-api:1.1.1', this it's brought in transitively by quarkus-smallrye-jwt.

UnsatisfiedDependencyException for #DataNeo4jTest

I try to test my code with Spring-Boot Neo4j but I've got an error like org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.sha.neo4j.service.UserServiceTest': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.sha.neo4j.service.UserService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}
Dependencies;
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-neo4j'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.neo4j.test:neo4j-harness:4.0.0'
testImplementation 'org.neo4j:neo4j-ogm-embedded-driver:3.2.8'
}
And test class;
#RunWith(SpringRunner.class)
#DataNeo4jTest
public class UserServiceTest
{
#Autowired
private UserService userService;
#Test
public void testIt()
{
User user = new User();
user.setLastName("Test");
user.setName("Test");
userService.saveUser(user);
List<User> users = userService.findAll();
assertThat(users).hasSize(1);
}
}
In here, I've jus try to test above code with embedded driver but I've got an error like above. I don't have a specific properties (test application.properties) for test. Test works with neo4j-desktop bolt driver.
Is there any suggestion?
You should use #SpringBootTest over your tests. #DataNeo4jTest doesn't load any required services.

Spring Cloud Stream Configuration classes are not being loaded

After updating from Spring Boot 2.0.6 / Spring Cloud Finchley.RELEASE to Spring Boot 2.1.3 / Spring Cloud Greenwich.SR1, I am experiencing a very odd configuration / component scanning issue.
The application is structured as follows:
main-application
messaging-lib
commons-lib
Main application is annotated with #SpringBootApplication(scanBasePackages = {"com.app.libs", "com.app"}), where the com.app packages are those under the main-application, while com.app.libs are the packages of the libs.
The commons-lib configuration which is simply a framework-esque library has the following main configuration entrypoint:
package com.app.libs.commons
#Target(ElementType.TYPE)
#Retention(RetentionPolicy.RUNTIME)
#Documented
#Inherited
#Import(CommonsConfiguration.class)
public #interface EnableCommons {
}
With CommonsConfiguration having:
package com.app.libs.commons.config
#Configuration
#ConditionalOnProperty(value = "com.app.config.commons", matchIfMissing = true)
#ComponentScan(basePackages = "com.app.libs.commons")
public class FrameworkConfiguration {
This way, I can basically annotate a single configuration class in my main-application and have it pick up common beans.
The messaging-lib configuration which uses Spring Cloud Stream has the following configurations:
#Configuration
#Import({ CustomBinding.class })
#PropertySource("classpath:kafka.properties")
#EnableBinding(Source.class)
#EnableAutoConfiguration
public class BindingConfiguration {
}
The cloud stream configuration is as follows:
spring.cloud.stream.bindings.output.destination=${spring.application.name}
spring.cloud.stream.kafka.bindings.output.producer.sync=true
spring.cloud.stream.default.group=${spring.application.name}
spring.cloud.stream.default.producer.partitionCount=9
spring.cloud.stream.default.producer.partitionKeyExpression=headers.entityId
spring.cloud.stream.kafka.binder.autoAddPartitions=true
spring.cloud.stream.kafka.binder.autoCreateTopics=false
When starting the application, the following error message is produced:
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'spring.cloud.stream.default.producer.partition-key-expression' to org.springframework.expression.Expression:
Property: spring.cloud.stream.default.producer.partitionkeyexpression
Value: headers.entityId
Origin: "spring.cloud.stream.default.producer.partitionKeyExpression" from property source "class path resource [kafka.properties]"
Reason: No converter found capable of converting from type [java.lang.String] to type [#com.fasterxml.jackson.databind.annotation.JsonSerialize org.springframework.expression.Expression]
Action:
Update your application's configuration
After some looking through the source code, I've noticed that the SpelConverter in question is the one that is supposed to be initialized in SpelExpressionConverterConfiguration. Indeed, if I add #Import({ SpelExpressionConverterConfiguration.class }) or #Import({ BindingServiceConfiguration }) (the #Configuration class that imports the SpelExpressionConverterConfiguration) to my BindingConfiguration, the converter seems to get initialized. However, another error is then produced:
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'org.springframework.messaging.core.DestinationResolver' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'binderAwareChannelResolver' in 'BindingServiceConfiguration' not loaded because #ConditionalOnBean (types: org.springframework.cloud.stream.binder.BinderTypeRegistry; SearchStrategy: current) did not find any beans of type org.springframework.cloud.stream.binder.BinderTypeRegistry
Action:
Consider revisiting the entries above or defining a bean of type 'org.springframework.messaging.core.DestinationResolver' in your configuration.
I'm not quite sure what seems to be going on. When debugging, it seems that both BindingBeansRegistrar and BinderFactoryConfiguration (the classes imported through #EnableBinding) are loaded - yet no scanning occurs and the rest of the component scanning simply does not seem to happen.
I've tried importing the configuration classes and/or scanning the packages myself, but in both cases I am still missing the DestinationResolver bean, although it should have been initialized.
I've noted that, prior to the update, there were also some issues: I had to import BindingServiceConfiguration, BinderFactoryConfiguration, and SpelExpressionConverterConfiguration manually as well.
Would anybody have pointers as to what could be causing this issue?
EDIT: Here are the build.grade files (some includes are omitted for brevity):
Application build.gradle
apply from: new File(project(':scripts').projectDir, '/service-impl.gradle')
dependencies {
implementation project(':dependency-A')
implementation project(':dependency-B')
implementation project(':messaging-library')
testImplementation 'org.springframework.cloud:spring-cloud-stream-test-support'
}
service-impl.gradle contents:
buildscript {
apply from: new File(project(':buildscripts').projectDir, '/repositories.gradle') // Repository definitions
apply from: new File(project(':buildscripts').projectDir, '/dm-boot.gradle') // DM via spring boot plugin
apply from: new File(project(':buildscripts').projectDir, '/dm-versions.gradle') // DM versions
}
configurations {
all*.exclude module: 'spring-boot-starter-tomcat'
all*.exclude group: 'org.apache.bval'
}
artifacts {
archives bootJar
}
dependencies {
compileOnly 'org.projectlombok:lombok'
compile 'org.springframework.boot:spring-boot-starter'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-jetty'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.springframework.boot:spring-boot-starter-cache'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
compile 'org.springframework.cloud:spring-cloud-starter-config'
testCompile 'junit:junit'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompileOnly 'org.projectlombok:lombok'
compile 'net.logstash.logback:logstash-logback-encoder'
}
Commons Library build.gradle
apply from: new File(project(':buildscripts').projectDir, '/repositories.gradle') // Repository definitions
apply from: new File(project(':buildscripts').projectDir, '/dm-plain.gradle') // DM via spring boot plugin
apply from: new File(project(':buildscripts').projectDir, '/dm-versions.gradle') // DM versions
dependencies {
api 'com.restfb:restfb:2.3.0'
api 'commons-io:commons-io'
implementation 'com.jcraft:jsch:0.1.54'
//lombok
compileOnly 'org.projectlombok:lombok'
//spring
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-jetty'
implementation 'org.springframework.boot:spring-boot-starter-security'
api 'org.springframework.security:spring-security-core'
api 'org.springframework.security:spring-security-web'
api 'org.springframework:spring-jdbc'
api 'org.springframework.boot:spring-boot-starter-actuator'
//thrift modules
compileOnly 'com.facebook.swift:swift-codec'
compileOnly 'com.facebook.swift:swift-service'
//db modules
api 'org.postgresql:postgresql'
api 'org.flywaydb:flyway-core'
api 'com.zaxxer:HikariCP'
api 'org.jooq:jooq'
//embedded pg modules
compileOnly 'com.opentable.components:otj-pg-embedded'
api group: 'net.minidev', name: 'json-smart', version: '2.2.1'
api group: 'org.json', name: 'json', version: '20140107'
//tests
testImplementation 'junit:junit'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.opentable.components:otj-pg-embedded'
testImplementation 'org.springframework.security:spring-security-core'
testImplementation 'org.springframework.security:spring-security-web'
testImplementation 'org.springframework.security:spring-security-config'
testImplementation 'org.springframework:spring-jdbc'
testImplementation 'org.springframework.boot:spring-boot-starter-actuator'
testImplementation 'org.apache.sshd:sshd-core:1.7.0' // sftpFileTransfer testing - embedded sftp server
testCompileOnly 'org.projectlombok:lombok'
testCompileOnly 'javax.servlet:javax.servlet-api'
}
Messaging Lib build.gradle (used as a standalone lib, hence does not use the above .gradle files)
buildscript {
ext {
springBootVersion = '2.1.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply from: new File(rootDir.parentFile, 'buildscripts/publish.gradle')
apply from: new File(rootDir.parentFile, 'buildscripts/coverage.gradle')
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.app.libs.messaging'
version = '0.0.3'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
ext {
springCloudVersion = 'Greenwich.SR1'
jacksonVersion = '2.9.6'
lombokVersion = '1.16.18'
jooqVersion = '3.11.2'
flywayVersion = '5.2.1'
}
dependencies {
compile 'org.aspectj:aspectjweaver'
compile 'org.springframework:spring-tx'
compile 'org.springframework.cloud:spring-cloud-stream'
compile 'org.springframework.cloud:spring-cloud-stream-binder-kafka'
compile 'org.apache.commons:commons-lang3:3.5'
compile 'org.javassist:javassist:3.22.0-GA'
compile "org.flywaydb:flyway-core:${flywayVersion}"
compileOnly "org.jooq:jooq:${jooqVersion}"
compileOnly "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'org.springframework.boot:spring-boot-starter-json'
testCompile 'org.springframework.cloud:spring-cloud-stream-test-support'
testCompile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
testCompile "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
testCompile 'junit:junit:4.12'
testCompile "org.jooq:jooq:${jooqVersion}"
testCompile "org.flywaydb:flyway-core:${flywayVersion}"
testCompile 'org.postgresql:postgresql:42.2.2'
testCompile 'com.opentable.components:otj-pg-embedded:0.13.0'
testCompile 'org.springframework:spring-jdbc'
}
dependencyManagement {
// disable maven exclusion to enhance gradle import performance
// https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/153
applyMavenExclusions = false
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
jar.enabled = true
bootJar.enabled = false
I've tried to omit any files that I think should be unrelated.

Resources