Solve BUG: start error: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean wit

BUG:

Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘dataSourceController’: Unsatisfied dependency expressed through field ‘aService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘aServiceImpl’: Unsatisfied dependency expressed through field ‘aMapper’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘aMapper’ defined in file [D:\××\AMapper.class]: Cannot resolve reference to bean ‘testSqlSessionTemplate’ while setting bean property ‘sqlSessionTemplate’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSourceConfig’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘myprops.mysql.url’ in value “${myprops.mysql.url}”
insert image description here

Solution: Check whether the spring.profiles.active configured in the application configuration file is in the correct format

Correct format:
insert image description here

Possible wrong forms:
insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45752941/article/details/112617430