issue the following error when unit testing
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @Context
There are two reasons for this problem
1. See if there is a primary startup class
2. As shown in the figure above, if the main boot class already exists, the error may be in the test directory and will be reported if they are not in the same directory.
Put it in the same directory and the problem is solved.
- Spring boot prompt could not resolve placeholder in string value
- Solve the error of dual system installation: the grub-efi-amd64-signed package failed to install into /target/.
- Depending on the custom component jar package, unable to read meta data for class appears after startup
- This application has no explicit mapping for /error, so you are seeing this as a fallback (How to Fix)
- javax.persistence.EntityNotFoundException : unable to find error
- The computer can’t turn on ERROR: NO BOOT DISK HAS BEEN DETECTED OR THE DISK HAS FAILED
- Springboot framework Maven build fastjson start error
- How to generate main () method in java graphical interface
- Common forms of springboot2. X boot class location
- @How to solve eclipse error after setter and @ getter (@ data) annotation
- The problem that the content extra data in the notification cannot be updated
- error 1962：no operating system found.boot sequence will automatically repeat.
- Springbatch failed to execute commandlinerunner
- Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded (How to Fix)
- Lenovo-win7 system computer boot prompt error 1962: no operating
- Unable to read meta data for class
- Spring cloud is a big hole. Failed to start bean ‘eurekaAutoServiceRegistration’
- spring boot Whitelabel Error Page
- Solution of duplicate entry ‘value’ for key ‘field name’ in MySQL