展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

gradle创建web工程

  • 配置环境

  • 添加插件

  • build.gradle中添加依赖

dependencies {
implementation 'org.springframework:spring-beans:4.1.7.RELEASE'
implementation 'org.springframework:spring-web:4.1.7.RELEASE'
implementation 'org.springframework:spring-webmvc:4.1.7.RELEASE'
implementation 'org.springframework:spring-tx:4.1.7.RELEASE'
implementation 'org.springframework:spring-test:4.0.5.RELEASE'
implementation 'org.springframework:spring-jdbc:4.1.7.RELEASE'
implementation 'org.mybatis:mybatis-spring:1.2.3'
implementation 'org.mybatis:mybatis:3.3.0'
implementation 'mysql:mysql-connector-java:5.1.36'
implementation 'com.alibaba:druid:1.0.15'
implementation "com.fasterxml.jackson.core:jackson-databind:2.2.3"
implementation "com.fasterxml.jackson.core:jackson-annotations:2.2.3"
implementation "com.fasterxml.jackson.core:jackson-core:2.2.3"
implementation 'org.aspectj:aspectjweaver:1.8.6'
implementation 'log4j:log4j:1.2.17'
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'jstl:jstl:1.2'
compileOnly 'javax.servlet:servlet-api:2.5'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
  • main文件夹下新建webapp文件夹,再新建WEB-INF文件夹,再新建web.xml

  • resource路径下新建

applicationContext.xml
springmvc.xml
mybatis-config.xml
jdbc.properties
  • 最后编写业务逻辑即可
posted @   DogLeftover  阅读(32)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术
点击右上角即可分享
微信分享提示