com.the_qa_company.qendpoint.config.WebConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qendpoint-backend Show documentation
Show all versions of qendpoint-backend Show documentation
SPARQL Endpoint of the qendpoint.
package com.the_qa_company.qendpoint.config;
import com.the_qa_company.qendpoint.controller.Sparql;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Configuration;
@Configuration
public class WebConfig implements WebServerFactoryCustomizer {
@Autowired
Sparql sparql;
@Override
public void customize(ConfigurableServletWebServerFactory factory) {
// set the port asked by the user
factory.setPort(sparql.getPort());
}
}