共 6 篇文章
显示摘要每页显示  条
java注解日志记录到数据库1. pom添加依赖包。METHOD) //注解放置的目标位置,METHOD是可注解在方法级别上@Retention(RetentionPolicy.RUNTIME) //注解在哪个阶段执行@Documented //生成文档public @interface MyLog { String value() default "";}@Controller@RequestMapping("/test")public class UserController { @MyLog...
Eureka工作原理Eureka 工作原理。服务注册服务提供者启动时,会通过 Eureka Client 向 Eureka Server 注册信息,Eureka Server 会存储该服务的信息,Eureka Server 内部有二层缓存机制来维护整个注册表。Zone 内的 Eureka Client 优先和 Zone 内的 Eureka Server 进行心跳同步,同样调用端优先在 Zone 内的 Eureka Server 获取服务列表,当 Zon...
@Data注解 与 lombok.public class Person { private String name;javac对源代码进行分析,生成了一棵抽象语法树(AST)运行过程中调用实现了“JSR 269 API”的Lombok程序此时Lombok就对第一步骤得到的AST进行处理,找到@Data注解所在类对应的语法树(AST),然后修改该语法树(AST),增加getter和setter方法定义的相应树节点javac使用修改后...
<html xmlns:th="http://www.thymeleaf.org"><body> <h1>Product list</h1> <table> <tr> <th>NAME</th> <th>PRICE</th> <th>IN STOCK</th> </tr> <tr th:each="prod : ${prods}"> <td th:text="${prod.name}">Onio...
1、springBoot中application.properties的常用配置。#spring.thymeleaf.cache=false#spring.thymeleaf.prefix=classpath:/templates/#spring.thymeleaf.check-template-location=true#spring.thymeleaf.suffix=.html#spring.thymeleaf.encoding=UTF-8#spring.thymeleaf.content-type=text/html#spring.thymeleaf.mode=HTML53、定义banner输出信...
@Component:泛指组件,当组件不好归类的时候,我们可以使用这个注解进行标注。个人理解相当于<context:component-scan>,如果扫描到有@Component @Controller @Service等这些注解的类,则把这些类注册为bean。@Configuration:指出该类是 Bean 配置的信息源,相当于XML中的<beans></beans>,一般加在主类上。@Bean:相当于XM...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部