springboot
Phoenix_99
这个作者很懒,什么都没留下…
展开
-
重新整理angular+springBoot+mybatis所遇到的问题
2.异常:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception。4.angular 不识别https路径 403 (Forbidden)1.error:java: 无效的目标发行版: 18。在index.html中增加下记语句。解决方法:把执行文件放到最外层。1)angular部分。2)springboot部分。...原创 2022-08-12 20:37:35 · 148 阅读 · 0 评论 -
springboot_mybatis_pageHelper所遇到的问题点
1,Result Maps用错,应该用resultType2020-12-25 11:32:12.796 ERROR 5576 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested..原创 2020-12-25 10:46:50 · 363 阅读 · 0 评论 -
springboot关联mybatis遇到的问题
1,No MyBatis mapper was found in '[xx.xx]' package. Please check your configuration解决问题:@MapperScan(value = "com.yjg.honest.mybatis.mapper") //忘记加入mapperScan扫描了@SpringBootApplicationpublic class HonestApplication { public static void main(String[..原创 2020-12-16 08:40:29 · 185 阅读 · 0 评论 -
多对一 多对多
public class T_user { private Integer id; private String username; private String telephone; private Date birthday; private List<T_account> t_account;---set get方法----}public class T_account implements Serializable { priv.原创 2020-11-09 23:00:17 · 148 阅读 · 0 评论 -
mybatis表关联(一对一)
建表 t_accountSET FOREIGN_KEY_CHECKS=0;-- ------------------------------ Table structure for t_account-- ----------------------------DROP TABLE IF EXISTS `t_account`;CREATE TABLE `t_account` ( `ID` int NOT NULL COMMENT '编号', `UID` int DEFAULT NU..原创 2020-11-09 16:52:11 · 115 阅读 · 0 评论 -
Navicat连接docker中mysql出现的1521问题解决步骤
一 Navicat连接docker中的mysql时,不能连接,错误提示:1251 - Client does not support authentication protocol原因:mysql 8.0 默认使用 caching_sha2_password 身份验证机制;客户端不支持新的加密方式。二解决方案:1、进入mysql容器内部2,查看用户信息备注:host为 localhost表示本机使用 plugin非mysql_native_password ...原创 2020-09-23 20:40:47 · 414 阅读 · 0 评论 -
SpringBoot web开发 引入thymeleaf
thymeleaf特点是语法更简单,功能更强大。1 引入thymeleaf (版本不同,<version>2.3.3.RELEASE</version>可加或不必加入(<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> &原创 2020-09-01 12:58:40 · 159 阅读 · 0 评论 -
springboot的web开发
一 自动配置原理1)spingboot帮我们配置了什么?能不能修改?能修改哪些配置?xxxxxxxAutoConfiguration帮我们往容器里添加组件xxxxProperties配置类来封装配置文件内容2)springboot对静态资源的映射规则1. 所有web/jars/**,都去classpath:/META-INFO/resources/webjars/找资源。2.webjars以jar包的形式引入静态资源。参考https://www.webjars.org/例如.原创 2020-08-30 10:49:15 · 148 阅读 · 0 评论 -
springboot与日志
一 springboot默认使用SLF4j抽象类和logback实现类1. 如何使用在实现中不应该直接调用实现类的方法,而是调用抽象的方法。在类中引入SLF4j抽象类的jar包和logback的实现jar包例子,import org.slf4j.Logger;import org.slf4j.LoggerFactory;public class HelloWorld { public static void main(String[] args) { Logger l...原创 2020-08-30 06:59:21 · 97 阅读 · 0 评论 -
springboot自动配置原理
1, springboot启动的使用,加载主配置类,然后开启了自动配置功能(@EnableAutoConfiguration)2,@EnableAutoConfiguration作用 利用AutoConfigurationImportSelector给容器中导入一些组件, 可以通过AutoConfigurationImportSelector方法进行查看 List<String> configurations = this.getCandidateConfigu...原创 2020-08-26 20:07:36 · 138 阅读 · 0 评论 -
使用profile配置多环境
第一种方式:1, application.propertiesserver.port=8089spring.profiles.active=dev2.建立另一个配置文件,application-dev.properties(注意"-"是必须的)server.port=8081第二种方式:yml文档块的形式application.ymlspring: profiles: active: dev---server: port: 8083spri.原创 2020-08-26 16:54:30 · 217 阅读 · 0 评论 -
给容器添加组件
1 测试classpackage com.example.demo;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.test.context.SpringBootTest;import org.springframework.context...原创 2020-08-25 22:35:30 · 242 阅读 · 0 评论 -
springboot快速构建1
启动程序import org.springframework.boot.test.context.SpringBootTest;import org.springframework.test.context.junit4.SpringRunner;@RunWith(SpringRunner.class)@SpringBootTestpublic class SpringBoot02ConfigApplicationTests { @Autowired Person person.原创 2020-08-25 21:27:02 · 130 阅读 · 0 评论