I\'m using Spring MVC 4, Hibernate and PostgreSQL 9.3 and have defined function (stored procedure) inside Postgres like this:
CREATE OR REPLACE FUNCTION spa.
In case you are using also spring data, you could just define a procedure inside your @Repository interface like this,
@Repository
@Procedure(value = "spa.create_tenant") public void createTenantOrSomething(@Param("t_name") String tNameOrSomething);
More in the docs.