Maven: run as-> maven build时候报错

1. Could not find artifact com.taotao:taotao-parent:pom:0.0.1-SNAPSHOT and ‘parent.relativePath’ points at wrong local POM @ line 4, column 10
解决办法:
将依赖的所有父工程run as->maven install安装到本地库中,可以在repository里面查看是否已经安装
2. Could not resolve dependencies for project com.taotao:taotao-manager-web:war:0.0.1-SNAPSHOT: Could not find artifact com.taotao:taotao-manager-interface:jar:0.0.1-SNAPSHOT
解决办法:
运行的是之前的web 工程,将所有的run as maven build 的选项删除。 重新运行一下
3. Error creating bean with name ‘itemController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taotao.service.ItemService com.taotao.controller.ItemController.ItemService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘itemService’: FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.taotao.service.ItemService. No provider available for the service com.taotao.service.ItemService from the url zookeeper://192.168.195.131:2181/com.alibaba.dubbo.registry.RegistryService?application=taotao-manager-web&dubbo=2.5.3&interface=com.taotao.service.ItemService&methods=getItemById&pid=13716&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1543214347718 to the consumer 192.168.195.6 use dubbo version 2.5.3
解决办法:
先启动服务端再启动客户端
4. Invalid bound statement(not found)解决mapper映射文件不发布
逆向工程的实现类是.xml文件,在工程中有,但是编译之后就没有了。
解决办法:
在taotao-manager-dao工程的pom文件中添加如下内容:

<build>
	<resources>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>false</filtering>
        </resource>
    </resources>
</build>

5. Serialized class………must implement java.io. Serialized
表名类序列化失败,服务端和表现层通信时候,客户端要调用服务端的服务,对象要序列化和反序列化,所以要把pojo类实现Serialized接口
解决办法:
把pojo类实现Serialized接口

猜你喜欢

转载自blog.csdn.net/qq_37886086/article/details/84558362