1

I have an SQL Query and i want to put it in the XML spring config File, but i'm getting formatting errors so how can i escape double quotes in this case ?

Here is my property :

<authentication-manager>
       <authentication-provider>
        <jdbc-user-service data-source-ref="dataSource"
           users-by-username-query="select USERNAME as "username",PASSWORD as "password",1 as "enabled" from USER_APP where username = 'a'"
        />
       </authentication-provider>
    </authentication-manager>

I've tried the \ and it's not working !

Thanks in advance !

4

1 回答 1

7

尝试这个

<authentication-manager>
       <authentication-provider>
        <jdbc-user-service data-source-ref="dataSource"
           users-by-username-query="select USERNAME as &quot;username&quot;,PASSWORD as &quot;password&quot;,1 as &quot;enabled&quot; from USER_APP where username = 'a'"
        />
</authentication-manager>
于 2013-08-12T12:09:50.330 回答