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 | |
@ConfigurationProperties('agorapulse') | |
class AgorapulseConfiguration { | |
String foo | |
String bar | |
} |
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
@CompileDynamic | |
class MyService { | |
GrailsApplication grailsApplication | |
String returnFoo() { | |
// normal access | |
return grailsApplication.config.agorapulse.foo | |
} | |
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
plugins { | |
id 'org.kordamp.gradle.groovy-project' version '0.46.0' | |
} | |
config { | |
release = (rootProject.findProperty('release') ?: false).toBoolean() | |
info { | |
name = 'Sample' | |
vendor = 'Acme' |
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
buildscript { | |
repositories { | |
gradlePluginPortal() | |
} | |
dependencies { | |
classpath 'org.kordamp.gradle:settings-gradle-plugin:0.46.0' | |
} | |
} | |
apply plugin: 'org.kordamp.gradle.settings' |
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 { | |
annotationProcessor("io.micronaut:micronaut-validation") | |
annotationProcessor("io.micronaut.data:micronaut-data-hibernate-jpa:1.1.3") | |
compileOnly("jakarta.persistence:jakarta.persistence-api:2.2.2") | |
implementation("io.micronaut.data:micronaut-data-hibernate-jpa:1.1.3") | |
implementation("io.micronaut:micronaut-validation") | |
} |
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
sourceSets { | |
main { | |
groovy { | |
// the source folder for the GORM domain classes | |
srcDir 'grails-app/domain' | |
// if you also want to include some services | |
srcDir 'grails-app/services' | |
} | |
} | |
} |
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: "create-drop" | |
url: "jdbc:tc:mariadb:10.5.10:///test?useSSL=false" | |
driverClassName: "org.testcontainers.jdbc.ContainerDatabaseDriver" | |
dialect: org.hibernate.dialect.MySQL5InnoDBDialect | |
username: "username" | |
password: "password" |
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
@JdbcRepository(dialect = Dialect.MYSQL) | |
public interface PageRepository extends CrudRepository<Page, Long> { | |
@Override | |
@Join(value = "author", type = Join.Type.FETCH) | |
Optional<Page> findById(@NonNull @NotNull Long aLong); | |
} |
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
@JdbcRepository(dialect = Dialect.MYSQL) | |
interface VehicleRepository extends CrudRepository<Vehicle, Long> { | |
} |
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
@Repository | |
interface VehicleRepository extends CrudRepository<Vehicle, Long> { | |
} |