springfox-grails-integration icon indicating copy to clipboard operation
springfox-grails-integration copied to clipboard

grails 3.3.1

Open ibmsoft opened this issue 7 years ago • 10 comments

current ,can not use in grails 3.3.1, is there any solution?

ibmsoft avatar Nov 02 '17 15:11 ibmsoft

Yes, planning to work on it in the next couple weeks

dilipkrish avatar Nov 13 '17 13:11 dilipkrish

any progress?

ibmsoft avatar Dec 27 '17 02:12 ibmsoft

Yeah. I'm currently stuck at a point where Im no as familiar with grails. Im getting a message asking me to first initialize the gorm context before I can introspect domain classes. If you could provide insight that will be much appreciated.

dilipkrish avatar Dec 27 '17 02:12 dilipkrish

may be you can do something in plugin eg: void doWithApplicationContext() { // TODO Implement post initialization spring config (optional) }

ibmsoft avatar Jan 03 '18 03:01 ibmsoft

Not very familiar with grails internals, but thanks for the tip. I pushed a PR #22 with work in progress to solicit help. I'll look into it for sure.

dilipkrish avatar Jan 03 '18 03:01 dilipkrish

You need to start the plugin after GORM has been initialized. The solution is to set autostartup to false using this stanza in application.yaml:

springfox:
    documentation:
      auto-startup : false

In your Bootstrap.groovy, get a bean reference to the plugin and start it from init.

class BootStrap {
// springfox bean
DocumentationPluginsBootstrapper documentationPluginsBootstrapper;

    def init = { servletContext ->
        // Lets start springfox bean
        documentationPluginsBootstrapper.start()
        // Other initialization code
        //
        //
    }
    def destroy = {
    }
}

krishnact avatar May 27 '18 19:05 krishnact

There is a PR #23, I plan to merge in soon. Thanks for your suggestion!

dilipkrish avatar May 31 '18 13:05 dilipkrish

Any update on getting that PR merged?

TabbyC avatar Dec 13 '18 16:12 TabbyC

@dilipkrish Do you have plan to merge the PR#23 anytime soon?

hemantseth0210 avatar Apr 05 '19 21:04 hemantseth0210

Same question, Any plans to merge PR #23?

gabivis avatar Oct 09 '19 14:10 gabivis