背景描述
项目使用的是springboot2+jsp的架构。以前好好的项目复制了一份,然后就无法访问报错。百度了好久都乱七八糟的,还没有解决问题。错误消息如下:
html
2024-07-05 15:45:51.335 INFO [http-nio-12581-exec-1]org.springframework.web.servlet.DispatcherServlet -Initializing Servlet 'dispatcherServlet'
2024-07-05 15:45:51.337 INFO [http-nio-12581-exec-1]org.springframework.web.servlet.DispatcherServlet -Completed initialization in 1 ms
2024-07-05 15:45:51.386 WARN [http-nio-12581-exec-1]org.springframework.web.servlet.resource.ResourceHttpRequestHandler -Path with "WEB-INF" or "META-INF": [WEB-INF/views/index.jsp]
页面提示
解决方法
修改pom.xml文件
html
// 下面这三个插件缺一不可
// 原来的写法是有scope,发现访问报错,解决方法只需要把两个scope注释掉就可以访问了。
// 神奇的问题是现在还原回去,也好了。
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!-- <scope>provided</scope>-->
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<!-- <scope>provided</scope>-->
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
结束
-----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----
-----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----
-----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----
html
package cn.renkai721.bean.vo;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class MakeUpTheWordCount {
private String make_up_the_word_count_column_999999999_1;
private String make_up_the_word_count_column_999999999_2;
private String make_up_the_word_count_column_999999999_3;
private String make_up_the_word_count_column_999999999_4;
private String make_up_the_word_count_column_999999999_5;
private String make_up_the_word_count_column_999999999_6;
private String make_up_the_word_count_column_999999999_7;
private String make_up_the_word_count_column_999999999_8;
private String make_up_the_word_count_column_999999999_9;
private String make_up_the_word_count_column_999999999_10;
private String make_up_the_word_count_column_999999999_11;
private String make_up_the_word_count_column_999999999_12;
private String make_up_the_word_count_column_999999999_13;
private String make_up_the_word_count_column_999999999_14;
private String make_up_the_word_count_column_999999999_15;
private String make_up_the_word_count_column_999999999_16;
private String make_up_the_word_count_column_999999999_17;
private String make_up_the_word_count_column_999999999_18;
private String make_up_the_word_count_column_999999999_19;
private String make_up_the_word_count_column_999999999_20;
public String getMake_up_the_word_count_column_999999999_1() {
return make_up_the_word_count_column_999999999_1;
}
public void setMake_up_the_word_count_column_999999999_1(String make_up_the_word_count_column_999999999_1) {
this.make_up_the_word_count_column_999999999_1 = make_up_the_word_count_column_999999999_1;
}
public String getMake_up_the_word_count_column_999999999_2() {
return make_up_the_word_count_column_999999999_2;
}
public void setMake_up_the_word_count_column_999999999_2(String make_up_the_word_count_column_999999999_2) {
this.make_up_the_word_count_column_999999999_2 = make_up_the_word_count_column_999999999_2;
}
public String getMake_up_the_word_count_column_999999999_3() {
return make_up_the_word_count_column_999999999_3;
}
public void setMake_up_the_word_count_column_999999999_3(String make_up_the_word_count_column_999999999_3) {
this.make_up_the_word_count_column_999999999_3 = make_up_the_word_count_column_999999999_3;
}
public String getMake_up_the_word_count_column_999999999_4() {
return make_up_the_word_count_column_999999999_4;
}
public void setMake_up_the_word_count_column_999999999_4(String make_up_the_word_count_column_999999999_4) {
this.make_up_the_word_count_column_999999999_4 = make_up_the_word_count_column_999999999_4;
}
public String getMake_up_the_word_count_column_999999999_5() {
return make_up_the_word_count_column_999999999_5;
}
public void setMake_up_the_word_count_column_999999999_5(String make_up_the_word_count_column_999999999_5) {
this.make_up_the_word_count_column_999999999_5 = make_up_the_word_count_column_999999999_5;
}
public String getMake_up_the_word_count_column_999999999_6() {
return make_up_the_word_count_column_999999999_6;
}
public void setMake_up_the_word_count_column_999999999_6(String make_up_the_word_count_column_999999999_6) {
this.make_up_the_word_count_column_999999999_6 = make_up_the_word_count_column_999999999_6;
}
public String getMake_up_the_word_count_column_999999999_7() {
return make_up_the_word_count_column_999999999_7;
}
public void setMake_up_the_word_count_column_999999999_7(String make_up_the_word_count_column_999999999_7) {
this.make_up_the_word_count_column_999999999_7 = make_up_the_word_count_column_999999999_7;
}
public String getMake_up_the_word_count_column_999999999_8() {
return make_up_the_word_count_column_999999999_8;
}
public void setMake_up_the_word_count_column_999999999_8(String make_up_the_word_count_column_999999999_8) {
this.make_up_the_word_count_column_999999999_8 = make_up_the_word_count_column_999999999_8;
}
public String getMake_up_the_word_count_column_999999999_9() {
return make_up_the_word_count_column_999999999_9;
}
public void setMake_up_the_word_count_column_999999999_9(String make_up_the_word_count_column_999999999_9) {
this.make_up_the_word_count_column_999999999_9 = make_up_the_word_count_column_999999999_9;
}
public String getMake_up_the_word_count_column_999999999_10() {
return make_up_the_word_count_column_999999999_10;
}
public void setMake_up_the_word_count_column_999999999_10(String make_up_the_word_count_column_999999999_10) {
this.make_up_the_word_count_column_999999999_10 = make_up_the_word_count_column_999999999_10;
}
public String getMake_up_the_word_count_column_999999999_11() {
return make_up_the_word_count_column_999999999_11;
}
public void setMake_up_the_word_count_column_999999999_11(String make_up_the_word_count_column_999999999_11) {
this.make_up_the_word_count_column_999999999_11 = make_up_the_word_count_column_999999999_11;
}
public String getMake_up_the_word_count_column_999999999_12() {
return make_up_the_word_count_column_999999999_12;
}
public void setMake_up_the_word_count_column_999999999_12(String make_up_the_word_count_column_999999999_12) {
this.make_up_the_word_count_column_999999999_12 = make_up_the_word_count_column_999999999_12;
}
public String getMake_up_the_word_count_column_999999999_13() {
return make_up_the_word_count_column_999999999_13;
}
public void setMake_up_the_word_count_column_999999999_13(String make_up_the_word_count_column_999999999_13) {
this.make_up_the_word_count_column_999999999_13 = make_up_the_word_count_column_999999999_13;
}
public String getMake_up_the_word_count_column_999999999_14() {
return make_up_the_word_count_column_999999999_14;
}
public void setMake_up_the_word_count_column_999999999_14(String make_up_the_word_count_column_999999999_14) {
this.make_up_the_word_count_column_999999999_14 = make_up_the_word_count_column_999999999_14;
}
public String getMake_up_the_word_count_column_999999999_15() {
return make_up_the_word_count_column_999999999_15;
}
public void setMake_up_the_word_count_column_999999999_15(String make_up_the_word_count_column_999999999_15) {
this.make_up_the_word_count_column_999999999_15 = make_up_the_word_count_column_999999999_15;
}
public String getMake_up_the_word_count_column_999999999_16() {
return make_up_the_word_count_column_999999999_16;
}
public void setMake_up_the_word_count_column_999999999_16(String make_up_the_word_count_column_999999999_16) {
this.make_up_the_word_count_column_999999999_16 = make_up_the_word_count_column_999999999_16;
}
public String getMake_up_the_word_count_column_999999999_17() {
return make_up_the_word_count_column_999999999_17;
}
public void setMake_up_the_word_count_column_999999999_17(String make_up_the_word_count_column_999999999_17) {
this.make_up_the_word_count_column_999999999_17 = make_up_the_word_count_column_999999999_17;
}
public String getMake_up_the_word_count_column_999999999_18() {
return make_up_the_word_count_column_999999999_18;
}
public void setMake_up_the_word_count_column_999999999_18(String make_up_the_word_count_column_999999999_18) {
this.make_up_the_word_count_column_999999999_18 = make_up_the_word_count_column_999999999_18;
}
public String getMake_up_the_word_count_column_999999999_19() {
return make_up_the_word_count_column_999999999_19;
}
public void setMake_up_the_word_count_column_999999999_19(String make_up_the_word_count_column_999999999_19) {
this.make_up_the_word_count_column_999999999_19 = make_up_the_word_count_column_999999999_19;
}
public String getMake_up_the_word_count_column_999999999_20() {
return make_up_the_word_count_column_999999999_20;
}
public void setMake_up_the_word_count_column_999999999_20(String make_up_the_word_count_column_999999999_20) {
this.make_up_the_word_count_column_999999999_20 = make_up_the_word_count_column_999999999_20;
}
}