This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.transform.CompileStatic | |
import hello.legacy.Vehicle | |
import hello.legacy.VehicleDataService | |
import io.micronaut.context.event.ApplicationEventListener | |
import io.micronaut.runtime.event.ApplicationStartupEvent | |
import javax.inject.Singleton | |
@Singleton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataSource: | |
dbCreate: update | |
url: jdbc:mysql://localhost:3306/hello?useSSL=false | |
driverClassName: com.mysql.cj.jdbc.Driver | |
dialect: org.hibernate.dialect.MySQL5InnoDBDialect | |
username: grails | |
password: grails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
db: | |
image: mariadb | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: grails | |
MYSQL_USER: grails | |
MYSQL_DATABASE: hello | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.agorapulse.dru.Dru | |
import com.agorapulse.gru.Gru | |
import hello.HelloDataSets | |
import hello.legacy.Vehicle | |
import hello.legacy.VehicleDataService | |
import io.micronaut.test.annotation.MicronautTest | |
import spock.lang.AutoCleanup | |
import spock.lang.Specification | |
import spock.mock.AutoAttach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.agorapulse.dru.Dru | |
import com.agorapulse.gru.Gru | |
import com.agorapulse.gru.grails.Grails | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import grails.testing.gorm.DataTest | |
import grails.testing.spring.AutowiredTest | |
import grails.testing.web.controllers.ControllerUnitTest | |
import hello.legacy.Vehicle | |
import hello.legacy.VehicleDataService | |
import org.springframework.beans.factory.annotation.Autowired |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.transform.CompileStatic | |
import hello.legacy.VehicleDataService | |
import io.micronaut.context.annotation.Bean | |
import io.micronaut.context.annotation.Factory | |
import spock.mock.DetachedMockFactory | |
import javax.inject.Singleton | |
@Factory | |
@CompileStatic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.agorapulse.micronaut.grails.MicronautGrailsApp | |
import com.agorapulse.micronaut.grails.MicronautGrailsAutoConfiguration | |
import groovy.transform.CompileStatic | |
import hello.legacy.Vehicle | |
@CompileStatic | |
class Application extends MicronautGrailsAutoConfiguration { | |
final Collection<Package> packages = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.agorapulse.dru.Dru | |
import com.agorapulse.gru.Gru | |
import com.agorapulse.gru.grails.Grails | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import grails.testing.gorm.DataTest | |
import grails.testing.web.controllers.ControllerUnitTest | |
import spock.lang.AutoCleanup | |
import spock.lang.Specification | |
class VehicleControllerSpec extends Specification implements ControllerUnitTest<VehicleController>, DataTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
// other dependencies | |
testCompile "com.agorapulse:dru:0.8.1" | |
testCompile "com.agorapulse:dru-client-gorm:0.8.1" | |
testCompile "com.agorapulse:dru-parser-json:0.8.1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@CompileStatic | |
class MyService { | |
@Inject AgorapulseConfiguration configuration | |
String returnFoo() { | |
return configuration.foo | |
} | |
String returnBar() { |