springboot项目问题

1、安装oracle驱动依赖;
解决:https://blog.csdn.net/hu_mingwei/article/details/118492631
2、pom.xml没有提示

3、controller与前端的参数对应不上
解决:前段form的input使用name而不是id与controller形参对应
4、form登录使用action和submit方式提交用户名密码给对应的controller,This application has no explicit mapping for /error, so you are seeing this as a fallback.,There was an unexpected error (type=Method Not Allowed, status=405).
原因:
5:jquery官网下载,点击下载链接是js网页
进入代码页面后需要ctrl+s
6、将项目转化为angularJS项目或JS项目(configure->convert to angularJS/javascript project)后如何撤销?
解决:properties->project natures->选择remove
这篇写的很好:https://blog.csdn.net/jerry741/article/details/103460033?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.control
7、依赖在https://mvnrepository.com/里找
8、window.location.href跳转出现重复路径
解决:因为window.location.href是当前页面打开URL页面
9、form和ajax重复提交
. a j a x ( ) 后 面 r e t u r n f a l s e 10 、 a j a x 传 j s o n 到 c o n t r o l l e r 为 n u l l 解 决 : .ajax({})后面return false 10、ajax传json到controller为null 解决: .ajax()returnfalse10ajaxjsoncontrollernull.ajax({
url : “/east/index”,
type : “post”,
data:{
username : username,
password : password
},

@RequestMapping(“/index”)
@ResponseBody
public RespObject index(String username,String password) {
11、ajax中if()中也是==,仅用一个=会改变值而不正常判断
12、jquery设置span的文本用$().text(“文本”)
13、阻止用户未登录非法访问网页,使用拦截器还是过滤器
14、列表用ol、li,行表用table、tr、th(表头)、td
15、vue方法内不能用ajax,应该用axios,且返回的数据在response.data里
axios
.get(‘/项目名/MappingValue’)
.then(response => (this.sjqrs = response.data.result))
.catch(function (error) { // 请求失败处理
console.log(error);
});
16、在这里插入图片描述
注意新建html文件时默认在webapp下,不更改会出现在static找不到新建的html的情况
17、阿里脚手架的pom异常

		<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>3.3.1</version>
      </plugin>

18、前端调用接口时提示跨域
在controller类加上注解@CrossOrigin
19、打印sql
在application.properties中

logging.level.com.example.dao:debug

注意com.example.dao取决于你自己的路径
19、集成mysql

spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/数据库名?useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai
spring.datasource.username=用户名
spring.datasource.password=密码
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值