[Question] [DAO] Application failed to start when active profile was set other than mysql/h2/postgresql
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
***************************
APPLICATION FAILED TO START
***************************
Description:
Field daoPluginConfiguration in org.apache.dolphinscheduler.dao.DaoConfiguration required a bean of type 'org.apache.dolphinscheduler.dao.plugin.api.DaoPluginConfiguration' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'org.apache.dolphinscheduler.dao.plugin.api.DaoPluginConfiguration' in your configuration.
What you expected to happen
Start application normally
How to reproduce
- create a local configuration file
application-local.yaml, set active profile tolocal, application failed to start. - change file name to
application-mysql.yaml, set active profile tomysql, application started successfully.
Anything else
It seems the dao plugin checkes the profile and hardcodes as "mysql", "postgresql" and "h2", only loading the configuration when environment condition is met in org.apache.dolphinscheduler.dao.plugin.api.DatabaseEnvironmentCondition.
Version
3.2.x
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Can you describe what you what to do?
Would like to create some profiles (dev/test/prod) so I can customize configurations for different environments.
Since the current mysql profile is bound with many configurations, it is not recommended to change the configuration file to be compatible with different environments. You can create a profile with the same name and different contents for each environment to use in different environments.
Hello, how was this issue ultimately resolved?
dolphinscheduler_env.sh 文件中 ${DATABASE}不用修改