问题
I have no right to access the weblogic.Deployer stuff nor the web admin GUI (if that exists in Linux server version)
I can only upload file via FTP to a deployment folder (there are jsp/META-INF/WEB-INF sub folders) where the admin setup to us. And the admin also provide us a script to restart the app server. (OS is linux)
I wonder if this is possible to unzip the WAR file and upload files to server and restart the app server to get it started?
I actually tried and unable to see any spring related stdout and logs. The app server only show not found in web browser. just like the application does not exist at all.
I can deploy the WAR file in weblogic (windows edition). the app files should be ok.
回答1:
You should be able to deploy the exploded Spring Boot WAR to the folder.
But it's import that you change the context path in application.properties to match the context path the app will run under in Weblogic:
server.servlet.context-path=<the context path>
回答2:
META-INF\maven\com.example\demo\pom.properties
\pom.xml
\MANIFEST.MF
org\springframework\boot\loader\some folders and classes
WEB-INF\classes\com\example\demo\RootController.class
\ServletInitializer.class
\DemoApplication.class
\application.properties
\lib\and some jars
\lib-provided\and some jars
\dispatcherServlet-servlet.xml
\weblogic.xml
回答3:
weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:context-root>/</wls:context-root>
<wls:container-descriptor>
<wls:prefer-application-packages>
<!-- added these after some google -->
<wls:package-name>javax.validation</wls:package-name>
<wls:package-name>org.hibernate.validator</wls:package-name>
<wls:package-name>javax.el</wls:package-name>
<wls:package-name>javax.persistence</wls:package-name>
<!-- added above after some google -->
<wls:package-name>org.slf4j.*</wls:package-name>
<wls:package-name>org.springframework.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
</wls:weblogic-web-app>
来源:https://stackoverflow.com/questions/56542681/how-to-deploy-a-spring-boot-application-to-weblogic-12-2-1-3-0-without-deploy-a