So, the case is the following.
I have a piece of code that looks like this:
public interface CustomRepo extends CrudRepository<CustomEntity, Long> {
@Query(value = "select * from custom")
public List<CustomEntity> findAll();
}
Together with @EnableJDBCRepositories
in my @Configuration
file, this allows me to execute the custom query in JDBC natively.
Now, what I need is to substitute that
value = "select * from custom"
with something like this:
value = "query.one"
where "query.one"
is the placeholder for a property in a .properties file that looks like this:
query.one=select * from custom;
How could I accomplish that?