Consider defining a bean of type 'long' in your configuration.
时间: 2023-10-28 19:55:30 浏览: 148
This error message typically appears in a Spring application when you try to inject a dependency of type `long` but Spring is unable to find a bean of type `long` in your configuration.
However, `long` is a primitive type in Java, and as such, it cannot be directly injected as a bean in Spring. Instead, you can define a wrapper class or use the `Long` object type.
If you intended to inject a `Long` object, then you should check that your configuration contains a bean of type `Long` or `java.lang.Long`. You can also check that you are correctly using the `@Autowired` annotation or constructor injection to inject the dependency.
If you are unsure of how to proceed, please provide more details about your application and the specific error message you are seeing.
阅读全文