idea如何部署项目到weblogic

首先我们点击如下按钮

点击+号,找到weblogic服务器,并选择local

 

在server这个页面需要配置如下几点

关于webloigc如何创建域,可以参看我的另一篇文章,weblogic如何创建域

server页面我配置好,如图所示,点击Apply

Apply之后会出现如下显示

我们来启动一下,启动报错

点击OK后跳出这个页面

我们选择我们刚才开始配置的那个Jdk

配置好后,Apply,发现项目也不报错了

我们点击OK,退出页面,重新启动weblogic

这次启动报项目具体的一些错误,我先解决掉这些错误

解决掉错误之后,我们重新启动,加载没有报错,有如下红框提示,则代表启动成功

接下来,我们配置数据源

发现一直访问不到控制台,我们停掉weblogic

我们先把项目部署进去吧

点击shift+ctrl+alt+s,发现项目有错,将红框处报错的直接移除,然后Apply

 

选中项目

点击Apply,然后选择如下

然后回到weblogic页面将项目加载进去

然后再次运行weblogic

 

 

备注:我自己的项目需要做一些特殊的配置

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<Error> <Deployer> <BEA-149205> <Failed to initialize the application 'channel2_war_exploded' due to error weblogic.management.DeploymentException: [Deployer:149003]Unable to access application source information in 'D:\Item\idea_ver_nx\portal_nx\out\artifacts\channel2_war_exploded' for application 'channel2_war_exploded'. The specific error is: [Deployer:149158]No application files exist at 'D:\Item\idea_ver_nx\portal_nx\out\artifacts\channel2_war_exploded'...
weblogic.management.DeploymentException: [Deployer:149003]Unable to access application source information in 'D:\Item\idea_ver_nx\portal_nx\out\artifacts\channel2_war_exploded' for application 'channel2_war_exploded'. The specific error is: [Deployer:149158]No application files exist at 'D:\Item\idea_ver_nx\portal_nx\out\artifacts\channel2_war_exploded'..
    at weblogic.deploy.internal.targetserver.BasicDeployment.verifyLocalApp(BasicDeployment.java:124)
    at weblogic.deploy.internal.targetserver.BasicDeployment.createDeployment(BasicDeployment.java:146)
    at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:114)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
    at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
    Truncated. see log file for complete stacktrace

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

如果报以上的错误,不用管

如下图的什么Sources啊,什么之类不用做配置

部署的时候设置好编译文件的路径就可以了