Steps to reproduce
- Download source from https://guides.micronaut.io/latest/micronaut-data-mongodb-asynchronous-maven-java.zip
- Add a new test class under package
example.micronaut.some.other
named SomeOtherTest - Change Fruit class package to
example.micronaut.entity
- Change FruitRepository class package to
example.micronaut.repository
Environment
- Operating System: Ubuntu 22.04 LTS
- JDK "17.0.1" 2021-10-19 LTS
- Java HotSpot(TM) 64-Bit Server
For error snapshot, do refer https://github.com/micronaut-projects/micronaut-guides/issues/928
Is some micronaut configuration/ tags missing? I am trying to avoid creating a Micronaut codec class since I make use of only primitive data types!
I have basically found no way out, hence a quick help/ pointer would greatly help.
If you put your entities outside of the application package, you need to specify it in the mongo configuration: