I've spring boot application that calls oracle stored procedures when I run it it gives me a null output then I found out that first set serveroutput on command should be run for oracle to display the result for the stored procedure.
How can i run set serveroutput on in spring boot before executing the stored procedures.
here is my code to executer the stored procedure.
package com.dmacc.amsaadapterdmacc.model;
import lombok.Data;
import javax.persistence.\*;
import java.util.Date;
@Data
@Entity
@NamedStoredProcedureQuery(name = "pathwaysjourney_sp", procedureName = "AMSA_Marketing_Cloud.pathways_journey")
public class PathwaysJourney {
@Id
private long id;
private Integer pidm;
private String bannerID;
private String firstName;
private String lastName;
private Integer termCode;
private String termDescription;
private Integer applicationNumber;
private String applicationStatusCode;
private String applicationStatusDescription;
private String applicationProgram;
private String majorCode;
private String majorDescription;
private Date applicationDate;
private Integer daysFromApplication;
private String email;
private String mobileNumber;
`}`
`package com.dmacc.amsaadapterdmacc.dao;`
`import com.dmacc.amsaadapterdmacc.model.PathwaysJourney;`
`import org.springframework.beans.factory.annotation.Autowired;`
`import org.springframework.data.jpa.repository.Query;`
`import org.springframework.stereotype.Repository;`
`import javax.persistence.EntityManager;`
`import java.util.List;`
`@Repository`
`public class PathwaysJourneyDao {`
@Autowired
private EntityManager em;
@SuppressWarnings("unchecked")
`public List<PathwaysJourney> getPathwayJourney(){`
`return em.createNamedStoredProcedureQuery("pathwaysjourney_sp").getResultList();`
`}`
`}`
I couldn't find any clue how to solve this