How to replace table name with parameter value while using Spring Data JPA nativeQuery
<p>like this:</p>

<pre><code>public interface XXXRepository extends CrudRepository&lt;XXX, Integer&gt; {
@Query(value = "select * from ?1 where ...", nativeQuery = true)
List&lt;XXX&gt; findByXXX(String tableName, ...);}
</code></pre>

<p>It gives MYSQL syntax error with upon codes.
The syntax error shows that the table name in the SQL is surrounded with "'".</p>