The "@" placeholder prompt exception in the properties configuration file in the springboot project

Answered

My project configuration is like this:

porm.xml >

dev.properties >

so you can see the error message in application.properties 

The error message for "server.port" is "Cannot convert '@server.port@' to java.lang.Integer".

Other than that, when I use `ctrl + left mouse button`  click such as "@datasource.url@" , it can not jump to the corresponding filter file.

But when I do that, there is no mistake:

 

I would like to ask whether it is because the idea itself is not perfect for this configuration, or is my configuration error has led to such a result.

 

0
3 comments

Do you use "Maven-resources-plugin" (https://docs.spring.io/spring-boot/docs/current/reference/html/howto-properties-and-configuration.html):

 

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.7</version>
    <configuration>
        <delimiters>
            <delimiter>@</delimiter>
        </delimiters>
        <useDefaultDelimiters>false</useDefaultDelimiters>
    </configuration>
</plugin>

 

Is it possible to share project example for investigation?

0
Avatar
Permanently deleted user

@Yaroslav Bedrov Sorry to keep you waiting.

I did not introduce "Maven-resources-plugin" in the pom.xml file, But when I enabled "Maven-resources-plugin" as per the above configuration, the error was not resolved.

You can find my project demo here (https://gitee.com/lovender/show-project.git), please tell me if this link does not open

0

Thanks for the example! I reported issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-187711. Please follow it for updates.

0

Please sign in to leave a comment.