最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Spring Boot War部署到Tomcat

Spring Boot War部署到Tomcat

鳳凰求蠱 2019-11-28 13:59:52
我想將Spring Boot應(yīng)用程序部署到Tomcat,因?yàn)槲蚁氩渴鸬紸WS。我創(chuàng)建了一個(gè)WAR文件,但是即使它可見,它似乎也不能在Tomcat上運(yùn)行。詳細(xì)信息:0。這是我的應(yīng)用程序:@Configuration@ComponentScan@EnableAutoConfigurationpublic class App {    public static void main(String[] args) {        SpringApplication.run(SampleController.class, args);    }}@Controller@EnableAutoConfigurationpublic class SampleController {    @RequestMapping("/help")    @ResponseBody    String home() {        String input = "Hi! Please use 'tag','check' and 'close' resources.";        return input;    }}application.properties具有以下內(nèi)容:server.port=${port:7777}閱讀了許多頁面和問題后,我在POM中添加了以下內(nèi)容:http://maven.apache.org/xsd/maven-4.0.0.xsd“> 4.0.0<groupId>com.niewlabs</groupId><artifactId>highlighter</artifactId><version>1.0-SNAPSHOT</version><packaging>war</packaging><properties>    <java.version>1.8</java.version></properties>    <parent>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-parent</artifactId>    <version>1.1.9.RELEASE</version></parent>    <dependencies>    <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-web</artifactId>    </dependency>    <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-tomcat</artifactId>        <scope>provided</scope>    </dependency></dependencies>我運(yùn)行“ MVN程序包”,并獲得了WAR文件(大小為250Mb),并將其放入“ webapps”文件夾中。我啟動(dòng)了Tomcat,并能夠看到列出的應(yīng)用程序,在本例中為“ /highlighter-1.0-SNAPSHOT”。單擊應(yīng)用程序的鏈接將顯示“狀態(tài)404”頁面。當(dāng)我單獨(dú)運(yùn)行Spring Boot應(yīng)用程序時(shí),沒有容器時(shí),它運(yùn)行在localhost:7777上,但是在Tomcat中運(yùn)行時(shí)卻沒有任何顯示。更新:還有另一個(gè)參考。不知道它有多有用。
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 676 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)