io.micronaut.starter.cli.feature.database.javaRepository.rocker.raw Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of micronaut-cli Show documentation
Show all versions of micronaut-cli Show documentation
Generates Micronaut applications
@import io.micronaut.starter.application.Project
@args (
Project project,
String idTypeImport,
String idType,
Boolean jdbcRepository,
String dialect
)
@if (project.getPackageName() != null) {
package @project.getPackageName();
}
import io.micronaut.data.annotation.*;
import io.micronaut.data.model.*;
import io.micronaut.data.repository.CrudRepository;
@if (idTypeImport != null) {
@idTypeImport;
}
@if (jdbcRepository) {
import io.micronaut.data.jdbc.annotation.JdbcRepository;
import io.micronaut.data.model.query.builder.sql.Dialect;
}
@if (jdbcRepository) {
@if (dialect != null) {
@@JdbcRepository(dialect = Dialect.@dialect)
} else {
@@JdbcRepository
}
} else {
@@Repository
}
interface @project.getClassName()Repository extends CrudRepository<@project.getClassName(), @idType> {
}