Could not resolve placeholder in string value

后端 未结 11 1575
故里飘歌
故里飘歌 2020-12-01 01:00

I am trying to use properties from a .properties file, but it doesn\'t seem to work.

Here is my code:

@Service(\"ServiceFTP\")
@Transact         


        
11条回答
  •  时光取名叫无心
    2020-12-01 01:39

    In your configuration you have 2 PropertySourcesPlaceholderConfigurer instances.

    applicationContext.xml

    
        
            
        
    
    

    infraContext.xml

    
    

    By default a PlaceholderConfigurer is going to fail-fast, so if a placeholder cannot be resolved it will throw an exception. The instance from the applicationContext.xml file has no properties and as such will fail on all placeholders.

    Solution: Remove the one from applicationContext.xml as it doesn't add anything it only breaks things.

提交回复
热议问题