The service container is a standalone launcher because the backend service does not require the functionality of a Web container ,such as Tomcat or JBoss. If you insist on using web containers to load service providers, that increase complexity and is waste of resources.
The service container is just a simple Main method and loads a simple Spring container to expose the service.
The content of Service container can be extended, built-in spring, jetty, log4j etc.. This can be expanded with Container Extension Points. Configure it with the -D parameter in the java command or dubbo.properties
.
Automatically load all spring configurations in the META-INF/spring
.
dubbo.spring.config=classpath*:META-INF/spring/*.xml
dubbo.jetty.port=8080
: configure jetty start up portdubbo.jetty.directory=/foo/bar
: static file that can be visited by jetty directly.dubbo.jetty.page=log,status,system
: configure the displayed page, loading all pages by defaultdubbo.log4j.file=/foo/bar.log
: configure log file pathdubbo.log4j.level=WARN
: configure log leveldubbo.log4j.subdirectory=20880
: configure log sub directory for multi-process startup and avoiding conflictload spring by default.
java org.apache.dubbo.container.Main
Load the container that passed in by the main method
java org.apache.dubbo.container.Main spring jetty log4j
Load the container that passed in by the JVM option.
java org.apache.dubbo.container.Main -Ddubbo.container=spring,jetty,log4j
Load the container that passed in by dubbo.properties
in the classpath.
dubbo.container=spring,jetty,log4j