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

spring.content.rest.base-uri leading slash missing #87

Closed
lmtoo opened this issue Nov 19, 2019 · 3 comments
Closed

spring.content.rest.base-uri leading slash missing #87

lmtoo opened this issue Nov 19, 2019 · 3 comments
Labels

Comments

@lmtoo
Copy link

lmtoo commented Nov 19, 2019

I configed spring.content.rest.base-uri=/api/v1 ,but result document link is

http://localhost:8080/archivesapi/v1/content/4

compile group: 'com.github.paulcwarren', name: 'spring-content-rest-boot-starter', version: '1.0.0.M3'

@paulcwarren
Copy link
Owner

paulcwarren commented Nov 23, 2019

I am unable to reproduce this @lmtoo

In a spring boot application, I have this dependency:

		<dependency>
			<groupId>com.github.paulcwarren</groupId>
			<artifactId>spring-content-rest-boot-starter</artifactId>
			<version>1.0.0.M3</version>
		</dependency>

and this in my application.properties:

spring.content.rest.base-uri=/api/v1

(I also tried: spring.content.rest.baseUri=/api/v1)

With that configuration, I was able to post content for a document to:

Request URL: http://localhost:9090/api/v1/documentscontent/ec39165b-ddd8-4cba-b3d4-dab846a39291
Request Method: POST
Status Code: 201 
Remote Address: [::1]:9090
Referrer Policy: no-referrer-when-downgrade

Is it possible to create a small spring boot app that repro-es the issue, push it to your github org and point this issue at it?

@lmtoo
Copy link
Author

lmtoo commented Nov 25, 2019

@paulcwarren
Copy link
Owner

@lmtoo,

This line will mean that document content is exported to /archives/api/v1/content, not /archives/api/v1/documents.

That said, there is a bug in the refactored rest API that can't handle context paths by the looks, in this case "/archives". Will look into this.

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

No branches or pull requests

2 participants