Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest-Ressources need serverURL configured #4

Closed
rdmueller opened this issue Feb 15, 2017 · 5 comments
Closed

Rest-Ressources need serverURL configured #4

rdmueller opened this issue Feb 15, 2017 · 5 comments

Comments

@rdmueller
Copy link
Contributor

if grails.serverURL isn't configured, application will throw an exception.

Can be simply configured in application.yml

grails.serverURL: http://localhost:8080
@dilipkrish
Copy link
Member

@rdmueller How come its not breaking the sample grails app. Am I inadvertently doing something to make it work?

@rdmueller
Copy link
Contributor Author

I see. The sample app uses a different profile than I do (web). That seems to be the reason. Might be something for the documentation - others might run into the same problem...

@dilipkrish
Copy link
Member

Not sure what that means @rdmueller 🙄 I'm a grails novice. Could you perhaps update the Readme.adoc? Or perhaps if the sample that is being used for contract testing isn't the idiomatic sample would you mind creating a sample that shows what you mean? I'd be happy to include it in the springfox.

dilipkrish added a commit that referenced this issue Feb 23, 2017
@albert-hejy
Copy link

I run into the same problem with the profile "rest-api", and I noticed that "grails.serverURL" is added to demo project.

Here is my error log.

Caused by: java.lang.NullPointerException
	at java.lang.String.replace(String.java:2239)
	at springfox.documentation.grails.GrailsActionAttributes.actionUrl(GrailsActionAttributes.java:113)
	at springfox.documentation.grails.GrailsActionContext.lambda$path$0(GrailsActionContext.java:83)
	at java.util.Optional.map(Optional.java:215)
	at springfox.documentation.grails.GrailsActionContext.path(GrailsActionContext.java:83)

@dilipkrish
Copy link
Member

@albert-hejy what version of grails are u using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants