# # The contents of this file are subject to the license and copyright # detailed in the LICENSE and NOTICE files at the root of the source # tree and available online at # # http://www.dspace.org/license/ # # # Spring Boot's application.properties # # This properties file is used by Spring Boot to initialize its ApplicationContext and configure # default Spring beans. It also uses the "dspace.dir" custom setting to locate your DSpace installation, # and load all DSpace services and configurations. # # WARNING: Because this properties file initializes Spring Boot, it loads *before* any DSpace specific # configurations/settings. Therefore settings in this file CANNOT depend on any DSpace configurations. # The *only* DSpace configuration allowed in this file is "dspace.dir", which is documented below. # # HOW TO OVERRIDE SPRING SETTINGS: Since the DSpace Configuration Service loads early in the Spring Boot # startup process (see DSpaceConfigurationInitializer), most Spring Boot properties can be OVERRIDDEN in # your local.cfg. # # Docs (including info on how to override these default settings) # http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html # For common settings see: # http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html # ######################## # DSpace Settings # # DSpace home/installation directory # REQUIRED to be specified in this application.properties file, as it is used to locate and initialize # the DSpace Kernel and all Services (including configuration). # * See org.dspace.app.rest.utils.DSpaceKernelInitializer.getDSpaceHome() # NOTE: this configuration is filled out by Apache Ant during the DSpace install/update process. It does NOT # interact with or read its configuration from dspace.cfg. dspace.dir=${dspace.dir} ######################## # Servlet context path configuration for spring boot application running with embedded tomcat # server.servlet.context-path=/server ######################## # Jackson serialization settings # spring.jackson.serialization.fail-on-empty-beans=false ######################## # Internationalization # # Base Path for our messages file (i18n) spring.messages.basename=i18n/messages spring.messages.encoding=UTF-8 ######################## # URI Encoding and Decoding # # # Charset of HTTP requests and responses. Added to the "Content-Type" header if not set explicitly. server.servlet.encoding.charset=UTF-8 # Force the encoding to the configured charset on HTTP requests and responses. server.servlet.encoding.force=true ########################### # Server Properties # # Error handling settings # Whether to include the full Java stacktrace in error responses (in the "trace" property). # Valid values include "always" and "never". # Spring Boot & DSpace default to "never" as this is more secure for Production (as stacktraces may include info # or hints that hackers can use to attack your site). # However, you may wish to set this to "always" in your 'local.cfg' for development or debugging purposes. server.error.include-stacktrace = never # When to include the error message in error responses (introduced in Spring 2.3.x) server.error.include-message = always # Spring Boot proxy configuration (can be overridden in local.cfg). # By default, Spring Boot does not automatically use X-Forwarded-* Headers when generating links (and similar) in the # DSpace REST API. Three options are currently supported by Spring Boot: # * NATIVE = allows your web server to natively support standard Forwarded headers # * FRAMEWORK = (DSpace default) enables Spring Framework's built in filter to manage these headers in Spring Boot. # This setting is used by default to support all X-Forwarded-* headers, as the DSpace backend is often # installed behind Apache HTTPD or Nginx proxy (both of which pass those headers to Tomcat). # * NONE = (Spring default) Forwarded headers are ignored # For more information see # https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-use-behind-a-proxy-server server.forward-headers-strategy=FRAMEWORK ###################### # Cache Properties # Added for IIIF cache support. # Path to configuration file. spring.cache.jcache.config=classpath:iiif/cache/ehcache.xml ###################### # Spring Boot Autoconfigure # # DISABLE a few autoconfiguration scripts, as DSpace initializes/configures these already # * DataSourceAutoConfiguration (DB connection / datasource) # * HibernateJpaAutoConfiguration (Hibernate ORM) # * FlywayAutoConfiguration (Flyway migrations) # * SolrAutoConfiguration (Solr) # * Velocity (email templating) # # TODO: At some point we may want to investigate whether we can re-enable these and remove the custom DSpace init code spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, \ org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, \ org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration, \ org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration, \ org.springframework.boot.autoconfigure.velocity.VelocityAutoConfiguration spring.main.allow-bean-definition-overriding = true ######################### # Spring Boot Logging levels # # NOTE: The below settings can be uncommented to debug issues in Spring Boot/WebMVC. # These "logging.level" settings will also override defaults in "logging.config" below. #logging.level.org.springframework.boot=DEBUG #logging.level.org.springframework.web=DEBUG #logging.level.org.hibernate=ERROR ######################### # Log4J configuration logging.config = ${dspace.dir}/config/log4j2.xml ################################## # Spring MVC file upload settings # # Maximum size of a single uploaded file (default = 1MB) spring.servlet.multipart.max-file-size = 512MB # Maximum size of a multipart request (i.e. max total size of all files in one request) (default = 10MB) spring.servlet.multipart.max-request-size = 512MB ################################## # Spring Boot's HTTP Client configuration (for RestClient and RestTemplate) # https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#restclient-and-resttemplate # # "simple" tells Spring Boot to use JDK's HttpURLConnection (SimpleClientHttpRequestFactory) # We have to configure this explicitly for DSpace because Spring Boot's autoconfiguration will attempt to # use Jetty or similar if found on the classpath (and Jetty is on the classpath for Handle Server, etc) spring.http.client.factory = simple # "dont_follow" tells Spring Boot not to follow any redirects itself, but instead return the 3xx code to # the user's browser. spring.http.client.redirects = dont_follow