Creating a configuration class

The creation of a test configuration class aids the proper running of written tests. Within the src/test/kotlin directory of the Place Reviewer project, add a config package to com.example.placereviewer. Add the TestConfig class shown here to the package created:

package com.example.placereviewer.configimport org.springframework.context.annotation.ComponentScanimport org.springframework.context.annotation.Configuration@Configuration@ComponentScan(basePackages = ["com.example.placereviewer"])class TestConfig

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.