亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

將 Spring boot 和 angular 項目部署到 weblogic 12c

將 Spring boot 和 angular 項目部署到 weblogic 12c

Helenr 2021-08-06 09:41:21
我正在嘗試在 weblogic 12c (12.2.1) 上部署一個以 angular 為前端的 spring-boot 應用程序。我的代碼可在 - https://github.com/onkar0777/Angular-SpringBoot-REST-JWT我用 mvn clean install 創建了一場戰爭,它在使用 java -jar 運行時運行良好但是,當我將相同的戰爭部署到 weblogic 時,在點擊http://192.168.1.6:7001/myweb 時出現錯誤(myweb 是上下文根)白標錯誤頁面 此應用程序沒有明確的 /error 映射,因此您將其視為后備。Wed Aug 22 13:28:58 IST 2018 出現意外錯誤(type=Forbidden,status=403)。拒絕訪問我猜想以某種方式 weblogic 沒有將調用定向到 MainControllerpackage com.app.api;import org.springframework.stereotype.*;import org.springframework.web.bind.annotation.*;import springfox.documentation.annotations.*;@ApiIgnore@Controller // Dont use RestController as this method is mapping to a static file not a JSONpublic class MainController {  @RequestMapping(value={"/"})    public String index() {        return "index.html";    }}主應用程序package com.app;import javax.annotation.Resource;import org.springframework.boot.Banner;import org.springframework.boot.CommandLineRunner;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.boot.autoconfigure.domain.EntityScan;import org.springframework.boot.builder.SpringApplicationBuilder;import org.springframework.boot.web.support.SpringBootServletInitializer;import org.springframework.data.jpa.repository.config.EnableJpaRepositories;import org.springframework.transaction.annotation.EnableTransactionManagement;import org.springframework.web.WebApplicationInitializer;import com.app.services.StorageService;@SpringBootApplication@EnableJpaRepositories(basePackages ={ "com.app.repo"})@EntityScan(basePackages ={ "com.app.model"})@EnableTransactionManagementpublic class MainApp extends SpringBootServletInitializer implements CommandLineRunner, WebApplicationInitializer {    @Resource    StorageService storageService;    @Override    public void run(String... arg) throws Exception {        storageService.deleteAll();        storageService.init();    }
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 236 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號