Gradle开发web工程

1、创建一个普通的java工程

 

2、在main下创建webapp/WEB-INF目录,并创建一个web.xml文件

 

3、在build.gradle配置文件中添加war插件配置

 

4、然后重新加载项目

5、看到webapp文件夹已被idea识别为web目录。

6、添加依赖jar包
dependencies {
  testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
  testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
  compile 'org.springframework:spring-context:5.0.2.RELEASE'
  compile 'org.springframework:spring-web:5.0.2.RELEASE'
  compile 'org.springframework:s

Gradle开发web工程最先出现在Python成神之路

版权声明:
作者:admin
链接:https://www.techfm.club/p/16287.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>