fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivange larry <ivangela...@gmail.com>
Subject Re: Adding a new Resource in Fineract 1.x
Date Thu, 14 Mar 2019 04:42:17 GMT
Thanks Courage. That fixed my problem for me.

On Wed, Mar 13, 2019 at 9:57 PM Courage Angeh <courageangeh@gmail.com>
wrote:

> Sorry wrong code, this is the right one.
>
>   *. . .*
> <context:component-scan
>                  base-package="org.apache.fineract.accounting.*
> org.apache.fineract.commands.provider.*,
> org.apache.fineract.commands.handler.*,
> *...*
>
> org.apache.fineract.system.*">
> <context:exclude-filter expression="
> org.springframework.stereotype.Controller"
> * ...*
>
> On Wed, Mar 13, 2019 at 4:42 PM Courage Angeh <courageangeh@gmail.com>
> wrote:
>
> > Hi Larry,
> >
> > You need to add your base package to the
> > fineract-provider/src/main/resources/META-INF/spring/appContext.xml
> > <
> https://github.com/apache/fineract/pull/283/files#diff-f3d6abe979dfc7dfbafc5831007ba31e>
> like
> > so:
> >
> >    *. . .*
> > <context:component-scan
> >                  base-package="org.apache.fineract.accounting.*
> > org.apache.fineract.commands.provider.*,
> > org.apache.fineract.commands.handler.*,
> > *...*
> >
> > org.apache.fineract.notification.*">
> > <context:exclude-filter expression="
> > org.springframework.stereotype.Controller"
> > * ...*
> >
> > On Wed, Mar 13, 2019 at 11:43 AM ivange larry <ivangelarry@gmail.com>
> > wrote:
> >
> >> Maybe I should mention that I do get this strange error when I run the
> >> application. https://pastebin.com/t3H2LBNa
> >>
> >> The application seems to look for the resource class in the wrong
> location
> >> and returns a ClassNotFoundException
> >>
> >> On Wed, Mar 13, 2019 at 4:39 PM ivange larry <ivangelarry@gmail.com>
> >> wrote:
> >>
> >> > Thanks Vishwas for that observation. Unfortunately, it still doesn't
> >> work.
> >> > I have tried with this url
> >> >
> >> >
> >> >
> >>
> https://localhost:8443/fineract-provider/api/v1/heathCheck?tenantIdentifier=default
> >> >
> >> > Since that's the one I actually coded accidentally and it still
> returns
> >> > 404. The parameter tenantIdentifier is only present because I just
> >> copied
> >> > that link from other resources and changed the resource to heathCheck.
> >> But
> >> > my implementation does not actually expect a parameter. When I delete
> >> the
> >> > parameter from the string and make a request with
> >> > https://localhost:8443/fineract-provider/api/v1/heathCheck, I now
> get a
> >> > 400 error complaining of the missing parameter.
> >> >
> >> > Is there a guide that documents the steps needed to add a new
> resource?
> >> >
> >> > Let outline again the steps I took, maybe my code changes are not even
> >> > reflected in the deployment.
> >> >
> >> > 1) I added a class HealthCheckResource as already explained above.
> >> > 2) Build application with ./gradlew build
> >> > 3) Run application with ./gradlew tomcatRunWar
> >> >
> >> > Let me know if I'm doing something wrong.
> >> >
> >> > Thanks,
> >> > Larry
> >> >
> >> > On Wed, Mar 13, 2019 at 3:43 PM Vishwas Babu <
> >> > vishwas@confluxtechnologies.com> wrote:
> >> >
> >> >> Larry,
> >> >>
> >> >> There is a typo in the path parameter of your resource class, i.e
> >> >> heathCheck instead
> >> >> of healthCheck
> >> >>
> >> >> Regards,
> >> >> Vishwas
> >> >>
> >> >>
> >> >> On Wed, Mar 13, 2019 at 5:08 AM ivange larry <ivangelarry@gmail.com>
> >> >> wrote:
> >> >>
> >> >> > Hi all,
> >> >> >
> >> >> > I'm trying to add a new endpoint /healthCheck which will always
> >> respond
> >> >> > with 200 to confirm that the server is reachable. I have
> implemented
> >> a
> >> >> > HealthCheckResource.java in org.apache.fineract.system.api. I
> created
> >> >> the
> >> >> > package system.api. Here's my resource class
> >> >> >
> >> >> > https://gist.github.com/ivange94/3b67a80c6d9f90adeceddf052c6026d5
> >> >> >
> >> >> > I keep getting a 404 when I try to access the endpoint at
> >> >> >
> >> >> >
> >> >>
> >>
> https://localhost:8443/fineract-provider/api/v1/healthCheck?tenantIdentifier=default
> >> >> > .
> >> >> >
> >> >> > Is there anything I'm missing?
> >> >> >
> >> >> > Thanks,
> >> >> > Larry
> >> >> >
> >> >>
> >> >
> >> >
> >> > --
> >> > GSoC 2016 @OpenMRS
> >> > GSoC 2017 @LibreHealth
> >> > GCI 2016 Mentor @OpenMRS
> >> > GCI Org Admin @OpenMRS
> >> >
> >>
> >>
> >> --
> >> GSoC 2016 @OpenMRS
> >> GSoC 2017 @LibreHealth
> >> GCI 2016 Mentor @OpenMRS
> >> GCI Org Admin @OpenMRS
> >>
> >
>


-- 
GSoC 2016 @OpenMRS
GSoC 2017 @LibreHealth
GCI 2016 Mentor @OpenMRS
GCI Org Admin @OpenMRS

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message