Home > Back-end >  SpringBoot project startup times wrong, can't find the corresponding properties file.
SpringBoot project startup times wrong, can't find the corresponding properties file.

Time:09-28

project startup times wrong:
Org. Springframework. Beans. Factory. BeanDefinitionStoreException: Failed to parse the configuration class [com. Aisino. GyxxdzApplication]; Nested exception is Java. IO. FileNotFoundException: class path resource/config/email. Properties always be the opened because it does not exist
The at org. Springframework. Context. The annotation. ConfigurationClassParser. Parse (ConfigurationClassParser. Java: 181)
The at org. Springframework. Context. The annotation. ConfigurationClassPostProcessor. ProcessConfigBeanDefinitions (ConfigurationClassPostProcessor. Java: 308)
The at org. Springframework. Context. The annotation. ConfigurationClassPostProcessor. PostProcessBeanDefinitionRegistry (ConfigurationClassPostProcessor. Java: 228)
The at org. Springframework. Context. Support. PostProcessorRegistrationDelegate. InvokeBeanDefinitionRegistryPostProcessors (PostProcessorRegistrationDelegate. Java: 272)
The at org. Springframework. Context. Support. PostProcessorRegistrationDelegate. InvokeBeanFactoryPostProcessors (PostProcessorRegistrationDelegate. Java: 92)
The at org. Springframework. Context. Support. AbstractApplicationContext. InvokeBeanFactoryPostProcessors (AbstractApplicationContext. Java: 687)
The at org. Springframework. Context. Support. AbstractApplicationContext. Refresh (AbstractApplicationContext. Java: 525)
The at org. Springframework. Boot. Context. Embedded. EmbeddedWebApplicationContext. Refresh (EmbeddedWebApplicationContext. Java: 122)
The at org. Springframework. Boot. SpringApplication. Refresh (SpringApplication. Java: 693)
The at org. Springframework. Boot. SpringApplication. RefreshContext (SpringApplication. Java: 360)
The at org. Springframework. Boot. SpringApplication. Run (SpringApplication. Java: 303)
The at org. Springframework. Boot. SpringApplication. Run (SpringApplication. Java: 1118)
The at org. Springframework. Boot. SpringApplication. Run (SpringApplication. Java: 1107)
At com. Aisino. GyxxdzApplication. Main (GyxxdzApplication. Java: 18)
At sun. Reflect. NativeMethodAccessorImpl. Invoke0 (Native Method)
At sun. Reflect. NativeMethodAccessorImpl. Invoke (NativeMethodAccessorImpl. Java: 62)
At sun. Reflect. DelegatingMethodAccessorImpl. Invoke (43) DelegatingMethodAccessorImpl. Java:
The at Java. Lang. Reflect. Method. Invoke (498) Method. The Java:
The at org. Springframework. Boot. Devtools. Restart. RestartLauncher. Run (49) RestartLauncher. Java:
Under Caused by: Java. IO. FileNotFoundException: class path resource/config/email. Properties always be the opened because it does not exist
The at org. Springframework. Core. IO. ClassPathResource. GetInputStream (ClassPathResource. Java: 172)
The at org. Springframework. Core. IO. Support. EncodedResource. GetInputStream (EncodedResource. Java: 154)
The at org. Springframework. Core. IO. Support. PropertiesLoaderUtils. FillProperties (PropertiesLoaderUtils. Java: 98)
The at org. Springframework. Core. IO. Support. PropertiesLoaderUtils. FillProperties (PropertiesLoaderUtils. Java: 72)
The at org. Springframework. Core. IO. Support. PropertiesLoaderUtils. LoadProperties (58) PropertiesLoaderUtils. Java:
The at org. Springframework. Core. IO. Support. ResourcePropertySource. & lt; init> (ResourcePropertySource. Java: 65)
The at org. Springframework. Core. IO. Support. DefaultPropertySourceFactory. CreatePropertySource (DefaultPropertySourceFactory. Java: 36)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. ProcessPropertySource (ConfigurationClassParser. Java: 440)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. DoProcessConfigurationClass (ConfigurationClassParser. Java: 271)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. ProcessConfigurationClass (ConfigurationClassParser. Java: 245)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. Parse (ConfigurationClassParser. Java: 190)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. DoProcessConfigurationClass (ConfigurationClassParser. Java: 292)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. ProcessConfigurationClass (ConfigurationClassParser. Java: 245)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. Parse (ConfigurationClassParser. Java: 198)
The at org. Springframework. Context. The annotation. ConfigurationClassParser. Parse (ConfigurationClassParser. Java: 167)
. 18 common frames omitted
then I go to baidu, the reason to write the file path in the @ PropertySource notes, but I went to my code, I write is correct, however startup or error,


for bosses to help me see what's going on!! Thank you thank you!!!!!

CodePudding user response:

Change the file path, direct transfer files to the resources directory or static
  • Related