2

In the docs, it states,

The @JdbcRepository annotation accepts an optional string value which represents the name of the connection or datasource in a multiple datasource scenario. By default Micronaut Data will look for the default datasource.

However, I don't see any such value parameter within this annotation - only the dialect. Is this an error or am I missing something?

ustad
  • 459
  • 1
  • 6
  • 21

2 Answers2

1

Is this an error or am I missing something?

I think it is the former. If you file an issue at https://github.com/micronaut-projects/micronaut-data/issues we can take care of that.

Thanks for the feedback!

Jeff Scott Brown
  • 26,804
  • 2
  • 30
  • 47
1

Here is a complete snippet, using dialect & datasource:

@Repository(value = "inventoryDataSource")
@JdbcRepository(dialect = Dialect.ORACLE)
public interface PhoneRepository extends CrudRepository<Phone, Integer> {
    Optional<Phone> findByAssetId(@NotNull Integer assetId);
}

A patch/pull request has been submitted with correction to the documentation.

Espresso
  • 5,378
  • 4
  • 35
  • 66