- 博客(5)
- 收藏
- 关注
原创 算法题-20200409
/** 给定一个int[n] a,其在下标为0到k上以及k到n-1上都是单调递增,且a[n-1]小于a[0],求k */public class BBB { public static int findK(int[] source) { int length = source.length; if (length <= 2) { ...
2020-04-09 14:00:25
1490
原创 学习Spring boot AOP
1、添加Maven依赖 org.springframework.boot spring-boot-starter-aop2、编写切面类@Aspect@Componentpublic class BaseAop { private final static Logger logger= LoggerFactory.getLogger(Ba
2017-09-18 10:43:45
347
原创 学习Spring boot 数据库连接
1、配置文件内容 spring: profiles: active: dog datasource: driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/dogs username: root password: 123456 jpa
2017-09-15 09:33:17
221
原创 学习Spring boot 获取参数的注解
1、@PathVariable 从url中获取参数,格式如下,url遵循restful的访问规则。@RequestMapping(value = {"/dog/{id}"} , method = RequestMethod.GET)public String dog(@PathVariable("id") int id){2、@RequestParam
2017-09-14 17:10:11
672
原创 学习Spring boot 注解 @Value @Component @ConfigurationProperties
1、@Value 从当前的配置文件中读取参数,格式为@Value("${TypeName}")private Type typeName; 会自动进行类型转换。2、@Component 只有加了这个注解的类才可以被@Autowired使用。3、@ConfigurationProperties 从当前的配置文件中读取一整个集
2017-09-14 16:38:11
1418
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人