为了账号安全,请及时绑定邮箱和手机立即绑定

启动服务器, 在Initializing Spring FrameworkServlet 'springMvc' 不动了...

启动服务器, 在Initializing Spring FrameworkServlet 'springMvc' 不动了...

白衣染霜花 2019-02-26 03:49:20
1.能否在线交流,调试很久了2.提示的错误太少了3.网上各种原因的都有4.jdk 1.8,maven-tomcat7,这个会有冲突吗 spring-mvc <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"> <!-- @Controller注解扫描 --> <context:component-scan base-package="com.smniuhe.controller"></context:component-scan> <!-- 注解驱动: 替我们显示的配置了最新版的注解的处理器映射器和处理器适配器 --> <mvc:annotation-driven conversion-service="conversionService"></mvc:annotation-driven> <!-- 允许静态页面直接访问 --> <mvc:resources location="/js/" mapping="/js/**" /> <mvc:resources location="/css/" mapping="/css/**" /> <mvc:resources location="/fonts/" mapping="/fonts/**" /> <!-- 配置视图解析器 作用:在controller中指定页面路径的时候就不用写页面的完整路径名称了,可以直接写页面去掉扩展名的名称 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <!-- 真正的页面路径 = 前缀 + 去掉后缀名的页面名称 + 后缀 --> <!-- 前缀 --> <property name="prefix" value="/WEB-INF/jsp/"></property> <!-- 后缀 --> <property name="suffix" value=".jsp"></property> </bean> <!-- 引用dubbo服务 --> <dubbo:application name="taotao-manager-web" /> <dubbo:registry protocol="zookeeper" address="192.168.2.100:2181" /> <dubbo:reference interface="com.smniuhe.service.ItemService" id="itemService" /> </beans> pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.smniuhe</groupId> <artifactId>taotao-parent</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>taotao-manager-web</artifactId> <packaging>war</packaging> <dependencies> <dependency> <groupId>com.smniuhe</groupId> <artifactId>taotao-common</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <dependency> <groupId>com.smniuhe</groupId> <artifactId>taotao-manager-interface</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <!-- Spring --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> </dependency> <!-- JSP相关 --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>javax.servlet.jsp-api</artifactId> <scope>provided</scope> </dependency> <!-- dubbo相关的jar包 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <exclusions> <exclusion> <artifactId>spring</artifactId> <groupId>org.springframework</groupId> </exclusion> <exclusion> <artifactId>netty</artifactId> <groupId>org.jboss.netty</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> </dependency> <dependency> <groupId>com.github.sgroschupf</groupId> <artifactId>zkclient</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <configuration> <path>/</path> <port>8081</port> </configuration> </plugin> <!-- dubbo:application 识别不了问题 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.0.0</version> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <manifestEntries> <Main-Class>cn.chinaunicom.woplus.analysis.MongoStatisticServer.App</Main-Class> <X-Compile-Source-JDK>1.8</X-Compile-Source-JDK> <X-Compile-Target-JDK>1.8</X-Compile-Target-JDK> </manifestEntries> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.schemas</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.handlers</resource> </transformer> </transformers> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> 日志: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.smniuhe:taotao-manager-web:war:0.0.1-SNAPSHOT [WARNING] 'parent.relativePath' of POM com.smniuhe:taotao-manager-web:[unknown-version] (/Users/niuhesm/Documents/workspace/taotao-manager-web/pom.xml) points at com.smnniuhe:convertWord instead of com.smniuhe:taotao-parent, please verify your project structure @ com.smniuhe:taotao-manager-web:[unknown-version], /Users/niuhesm/Documents/workspace/taotao-manager-web/pom.xml, line 4, column 10 [WARNING] 'build.plugins.plugin.version' for org.apache.tomcat.maven:tomcat7-maven-plugin is missing. @ com.smniuhe:taotao-manager-web:[unknown-version], /Users/niuhesm/Documents/workspace/taotao-manager-web/pom.xml, line 99, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building taotao-manager-web 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for commons-logging:commons-logging:jar:1.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ taotao-manager-web --- [INFO] Deleting /Users/niuhesm/Documents/workspace/taotao-manager-web/target [INFO] [INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ taotao-manager-web >>> [INFO] [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ taotao-manager-web --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ taotao-manager-web --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /Users/niuhesm/Documents/workspace/taotao-manager-web/target/classes [INFO] [INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ taotao-manager-web <<< [INFO] [INFO] [INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ taotao-manager-web --- [INFO] Running war on http://localhost:8081/ [INFO] Creating Tomcat server configuration at /Users/niuhesm/Documents/workspace/taotao-manager-web/target/tomcat [INFO] create webapp with contextPath: 八月 23, 2017 4:51:31 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-8081"] 八月 23, 2017 4:51:31 下午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Tomcat 八月 23, 2017 4:51:31 下午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.47 八月 23, 2017 4:51:33 下午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 八月 23, 2017 4:51:34 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'springMvc'
查看完整描述

4 回答

?
墨色风雨

TA贡献1853条经验 获得超6个赞

你好这个问题你否解决,我也有同样的问题。

查看完整回答
反对 回复 2019-03-01
  • 4 回答
  • 0 关注
  • 2447 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信