java - spring工程引入ModelAndView 类报错,can not resolve ?
天蓬老师
天蓬老师 2017-04-18 10:34:45
0
1
861

写一个maven+spring的demo程序,但是引入ModelAndView类时报错,无法解析,导入其他类就没有问题,不知道错在哪里?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
迷茫

Let’s see if the situation is similar. I have imported: import com.alibaba.fastjson.JSON;I keep reporting errors, but the class file does not have a red xx:

I just modified the compiled jdk version of Maven. It seems that your jdk version has not been modified either:

<build>
    <plugins>
        <!-- Compiler 插件, 设定JDK版本 -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
                <showWarnings>true</showWarnings>
            </configuration>
        </plugin>
    </plugins>
</build>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!