随笔分类 - springboot基础
摘要:``` alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ alimaven spring plugin alimaven spring plugin https://maven.aliyun.com/repository/spring-plugin ```
阅读全文
摘要:``` org.springframework.boot spring-boot-starter-actuator ``` ``` # 显示详情 management: endpoint: health: show-details: always endpoints: web: exposure: include: '*' # include: metrics,health # 自定义info i
阅读全文
摘要:@JsonView使用 使用接口来声明多个视图 在值对象的get方法上指定视图 在Controller方法上指定视图 测试 @RequestBody 映射请求体到java方法的参数 @Valid注解和BindingResult验证请求参数的合法性并处理校验结果 参考import javax.vali
阅读全文
摘要:```XML war org.springframework.boot spring-boot-starter-tomcat provided ``` ```JAVA @SpringBootApplication(scanBasePackages = {"com.fly"}) public class SpringDemoApp extends SpringBootServletInitializ
阅读全文
摘要:neo4j 官网下载: 教程: bin下运行 在浏览器地址栏里输入http://localhost:7474 默认会跳转到 http://localhost:7474/browser 刚开始时,会弹出登录页面,默认的初始密码是neo4j,登录进去后会让你设置新的密码,设完后进入neo4j管理界面
阅读全文
摘要:templates/index.ftl 文件上传 页面使用thymeleaf templates/upload.html: templates/upload2.html: 文件大小限制:
阅读全文
摘要:整合email 测试 templates/index.ftl
阅读全文
摘要:事务管理 spring boot starter jdbc会自动默认注入DataSourceTransactionManager spring boot starter data jpa会自动默认注入JpaTransactionManager 整合jpa 整合mybatis mybatis/myba
阅读全文
摘要:@Scheduled注解执行定时任务 整合jdbcTemplate 区分多数据源 src/main/java/com/fly/db1/UserMapper.java
阅读全文
摘要:整合jsp pom.xml部分内容 src/main/webapp/WEB INF/index.jsp 整合freemarker src/main/resources/templates index.ftl 整合thymeleaf index.html
阅读全文
摘要:自定义拦截器 全局异常处理类 异步调用
阅读全文
摘要:配置为开发模式,代码做了修改,不用重新运行 idea需要该配置,mac测试无效 访问静态资源 src/main/resources/static 自定义消息转化器 idea读取properties文件中的汉字乱码解决 在IntelliJ IDEA中依次点击File Settings Editor F
阅读全文
摘要:日志管理 springboot默认日志框架是Logback,并用INFO级别输出到控制台 级别分别是TRACE,DEBUG,INFO,WARN,ERROR,FATAL,OFF 如: root日志配置 org.springframework.web日志配置 hibernate日志配置 配置日志输出文件
阅读全文
摘要:父工程 idea点击spring boot starter parent找到父工程spring boot dependencies模仿配置 父工程 子工程 SpringBoot整合测试 测试 SpringBootApplication注解 使用组合注解SpringBootApplication注解:
阅读全文
摘要:自定义banner src/main/resource 下新建 banner.txt,字符复制到banner.txt 中 生成字符网站推荐: 全局配置文件 src/main/resource 下新建 application.yml 或 application.properties applicati
阅读全文
摘要:springboot入门 启用自动配置注解
阅读全文

浙公网安备 33010602011771号