mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
DS-4367 remove unnecessary dspace.restUrl and fix default configuration
This commit is contained in:
@@ -73,12 +73,12 @@ public class MappedCollectionRestController {
|
|||||||
* The owning collection is not included in this list. It will transform the list of Collections to a list of
|
* The owning collection is not included in this list. It will transform the list of Collections to a list of
|
||||||
* CollectionRest objects and it'll then encapsulate these into a MappedCollectionResourceWrapper object
|
* CollectionRest objects and it'll then encapsulate these into a MappedCollectionResourceWrapper object
|
||||||
*
|
*
|
||||||
* curl -X GET http://<dspace.restUrl>/api/core/item/{uuid}/mappedCollections
|
* curl -X GET http://<dspace.baseUrl>/api/core/item/{uuid}/mappedCollections
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* <pre>
|
* <pre>
|
||||||
* {@code
|
* {@code
|
||||||
* curl -X GET http://<dspace.restUrl>/api/core/items/8b632938-77c2-487c-81f0-e804f63e68e6/mappedCollections
|
* curl -X GET http://<dspace.baseUrl>/api/core/items/8b632938-77c2-487c-81f0-e804f63e68e6/mappedCollections
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
@@ -121,14 +121,14 @@ public class MappedCollectionRestController {
|
|||||||
* This method will add an Item to a Collection. The Collection object is encapsulated in the request due to the
|
* This method will add an Item to a Collection. The Collection object is encapsulated in the request due to the
|
||||||
* text/uri-list consumer and the Item UUID comes from the path in the URL
|
* text/uri-list consumer and the Item UUID comes from the path in the URL
|
||||||
*
|
*
|
||||||
* curl -X POST http://<dspace.restUrl>/api/core/item/{uuid}/mappedCollections
|
* curl -X POST http://<dspace.baseUrl>/api/core/item/{uuid}/mappedCollections
|
||||||
* -H "Content-Type:text/uri-list"
|
* -H "Content-Type:text/uri-list"
|
||||||
* --data $'https://{url}/rest/api/core/collections/{uuid}'
|
* --data $'https://{url}/rest/api/core/collections/{uuid}'
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* <pre>
|
* <pre>
|
||||||
* {@code
|
* {@code
|
||||||
* curl -X POST http://<dspace.restUrl>/api/core/item/{uuid}/mappedCollections
|
* curl -X POST http://<dspace.baseUrl>/api/core/item/{uuid}/mappedCollections
|
||||||
* -H "Content-Type:text/uri-list"
|
* -H "Content-Type:text/uri-list"
|
||||||
* --data $'https://{url}/rest/api/core/collections/506a7e54-8d7c-4d5b-8636-d5f6411483de'
|
* --data $'https://{url}/rest/api/core/collections/506a7e54-8d7c-4d5b-8636-d5f6411483de'
|
||||||
* }
|
* }
|
||||||
@@ -176,12 +176,12 @@ public class MappedCollectionRestController {
|
|||||||
* This method will delete a Collection to Item relation. It will remove an Item with UUID given in the request
|
* This method will delete a Collection to Item relation. It will remove an Item with UUID given in the request
|
||||||
* URL from the Collection with UUID given in the request URL.
|
* URL from the Collection with UUID given in the request URL.
|
||||||
*
|
*
|
||||||
* curl -X DELETE http://<dspace.restUrl>/api/core/item/{uuid}/mappedCollections/{collectionUuid}
|
* curl -X DELETE http://<dspace.baseUrl>/api/core/item/{uuid}/mappedCollections/{collectionUuid}
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* <pre>
|
* <pre>
|
||||||
* {@code
|
* {@code
|
||||||
* curl -X DELETE http://<dspace.restUrl>/api/core/item/{uuid}/mappedCollections/{collectionUuid}
|
* curl -X DELETE http://<dspace.baseUrl>/api/core/item/{uuid}/mappedCollections/{collectionUuid}
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@@ -67,12 +67,12 @@ public class MappedItemRestController {
|
|||||||
* returning only items that belong to a different collection but are mapped to the given one.
|
* returning only items that belong to a different collection but are mapped to the given one.
|
||||||
* These Items are then encapsulated in a MappedItemResourceWrapper and returned
|
* These Items are then encapsulated in a MappedItemResourceWrapper and returned
|
||||||
*
|
*
|
||||||
* curl -X GET http://<dspace.restUrl>/api/core/collections/{uuid}/mappedItems
|
* curl -X GET http://<dspace.baseUrl>/api/core/collections/{uuid}/mappedItems
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* <pre>
|
* <pre>
|
||||||
* {@code
|
* {@code
|
||||||
* curl -X GET http://<dspace.restUrl>/api/core/collections/8b632938-77c2-487c-81f0-e804f63e68e6/mappedItems
|
* curl -X GET http://<dspace.baseUrl>/api/core/collections/8b632938-77c2-487c-81f0-e804f63e68e6/mappedItems
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class converts the restUrl and constructs a RootRest instance to return
|
* This class read the core configuration properties and constructs a RootRest instance to return
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RootConverter {
|
public class RootConverter {
|
||||||
@@ -25,7 +25,7 @@ public class RootConverter {
|
|||||||
RootRest rootRest = new RootRest();
|
RootRest rootRest = new RootRest();
|
||||||
rootRest.setDspaceName(configurationService.getProperty("dspace.name"));
|
rootRest.setDspaceName(configurationService.getProperty("dspace.name"));
|
||||||
rootRest.setDspaceURL(configurationService.getProperty("dspace.url"));
|
rootRest.setDspaceURL(configurationService.getProperty("dspace.url"));
|
||||||
rootRest.setDspaceRest(configurationService.getProperty("dspace.restUrl"));
|
rootRest.setDspaceRest(configurationService.getProperty("dspace.baseUrl"));
|
||||||
return rootRest;
|
return rootRest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,19 +25,11 @@ dspace.dir = /dspace
|
|||||||
# DSpace host name - should match base URL. Do not include port number.
|
# DSpace host name - should match base URL. Do not include port number.
|
||||||
dspace.hostname = localhost
|
dspace.hostname = localhost
|
||||||
|
|
||||||
# DSpace base host URL. Include port number etc.
|
# DSpace server backend webapp URL. Include port number etc.
|
||||||
dspace.baseUrl = http://localhost:8080
|
dspace.baseUrl = http://localhost:8080/server
|
||||||
|
|
||||||
# Full link your end users will use to access DSpace. In most cases, this will be the baseurl followed by
|
# Full link your end users will use to access DSpace. This is the URL of your angular UI
|
||||||
# the context path to the UI you are using.
|
dspace.url = http://localhost:3000
|
||||||
#
|
|
||||||
# Alternatively, you can use a url redirect or deploy the web application under the servlet container root.
|
|
||||||
# This is the URL that the front-end will be served on
|
|
||||||
dspace.url = ${dspace.baseUrl}
|
|
||||||
|
|
||||||
# This is the URL that will be used for the REST endpoints to be served on.
|
|
||||||
# This will typically be followed by /api to determine the root endpoints.
|
|
||||||
dspace.restUrl = ${dspace.baseUrl}/server
|
|
||||||
|
|
||||||
# Optional: DSpace URL for mobile access
|
# Optional: DSpace URL for mobile access
|
||||||
# This
|
# This
|
||||||
@@ -53,11 +45,9 @@ assetstore.dir = ${dspace.dir}/assetstore
|
|||||||
default.language = en_US
|
default.language = en_US
|
||||||
|
|
||||||
# Solr server/webapp.
|
# Solr server/webapp.
|
||||||
# DSpace uses Solr for all search/browse capability (and for usage statistics by default).
|
# DSpace uses Solr for all search/browse capability (and for usage statistics).
|
||||||
# The included 'solr' webapp MUST be deployed to Tomcat for DSpace to function.
|
# since DSpace 7, SOLR must be installed as a stand-alone service
|
||||||
# Usually it will be available via port 8080 and the 'solr' context path. But,
|
solr.server = http://localhost:8983/solr
|
||||||
# But, you may need to modify this if you are running DSpace on a custom port, etc.
|
|
||||||
solr.server = http://localhost:8080/solr
|
|
||||||
|
|
||||||
##### Database settings #####
|
##### Database settings #####
|
||||||
# DSpace only supports two database types: PostgreSQL or Oracle
|
# DSpace only supports two database types: PostgreSQL or Oracle
|
||||||
|
@@ -33,14 +33,11 @@ dspace.dir=/dspace
|
|||||||
# DSpace host name - should match base URL. Do not include port number
|
# DSpace host name - should match base URL. Do not include port number
|
||||||
dspace.hostname = localhost
|
dspace.hostname = localhost
|
||||||
|
|
||||||
# DSpace base host URL. Include port number etc.
|
# DSpace server backend webapp URL. Include port number etc.
|
||||||
dspace.baseUrl = http://localhost:8080
|
dspace.baseUrl = http://localhost:8080/server
|
||||||
|
|
||||||
# Full link your end users will use to access DSpace. In most cases, this will be the baseurl followed by
|
# Full link your end users will use to access DSpace. This is the URL of your angular UI
|
||||||
# the context path to the UI you are using.
|
dspace.url = http://localhost:3000
|
||||||
#
|
|
||||||
# Alternatively, you can use a url redirect or deploy the web application under the servlet container root.
|
|
||||||
#dspace.url = ${dspace.baseUrl}
|
|
||||||
|
|
||||||
# Name of the site
|
# Name of the site
|
||||||
dspace.name = DSpace at My University
|
dspace.name = DSpace at My University
|
||||||
@@ -53,11 +50,9 @@ dspace.name = DSpace at My University
|
|||||||
#default.language = en_US
|
#default.language = en_US
|
||||||
|
|
||||||
# Solr server/webapp.
|
# Solr server/webapp.
|
||||||
# DSpace uses Solr for all search/browse capability (and for usage statistics by default).
|
# DSpace uses Solr for all search/browse capability (and for usage statistics).
|
||||||
# The included 'solr' webapp MUST be deployed to Tomcat for DSpace to function.
|
# since DSpace 7, SOLR must be installed as a stand-alone service
|
||||||
# Usually it will be available via port 8080 and the 'solr' context path. But,
|
#solr.server = http://localhost:8983/solr
|
||||||
# But, you may need to modify this if you are running DSpace on a custom port, etc.
|
|
||||||
solr.server = http://localhost:8080/solr
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# DATABASE CONFIGURATION #
|
# DATABASE CONFIGURATION #
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
dspace.dir=/dspace
|
dspace.dir=/dspace
|
||||||
db.url=jdbc:postgresql://dspacedb:5432/dspace
|
db.url=jdbc:postgresql://dspacedb:5432/dspace
|
||||||
dspace.hostname=dspace
|
dspace.hostname=dspace
|
||||||
dspace.baseUrl=http://localhost:8080
|
dspace.baseUrl=http://localhost:8080/server
|
||||||
dspace.name=DSpace Started with Docker Compose
|
dspace.name=DSpace Started with Docker Compose
|
||||||
solr.server=http://dspacesolr:8983/solr
|
solr.server=http://dspacesolr:8983/solr
|
||||||
|
@@ -5,5 +5,5 @@
|
|||||||
dspace.dir = /dspace
|
dspace.dir = /dspace
|
||||||
db.url = jdbc:postgresql://dspacedb:5432/dspace
|
db.url = jdbc:postgresql://dspacedb:5432/dspace
|
||||||
dspace.hostname = localhost
|
dspace.hostname = localhost
|
||||||
dspace.baseUrl = http://localhost:8080
|
dspace.baseUrl = http://localhost:8080/server
|
||||||
solr.server=http://dspacesolr:8983/solr
|
solr.server=http://dspacesolr:8983/solr
|
||||||
|
Reference in New Issue
Block a user