摘要: 描述 给出2*n + 1 个的数字,除其中一个数字之外其他每个数字均出现两次,找到这个数字。 样例 给出 [1,2,2,1,3,4,3],返回 4 public class Solution { /** * @param A: An integer array * @return: An integ 阅读全文
posted @ 2018-05-09 16:36 月关莫利亚 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1.Write a function that add two numbers A and B. You should not use + or any arithmetic operators. solution: 阅读全文
posted @ 2018-05-07 18:08 月关莫利亚 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1. 启动报错,查看debug $ java -jar myproject-0.0.1-SNAPSHOT.jar –debug 2.自定义banner The banner that is printed on start up can be changed by adding a banner.t 阅读全文
posted @ 2018-03-15 23:58 月关莫利亚 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1.在pom.xml中使用spring-boot-starter-parent的作用: Maven users can inherit from the spring-boot-starter-parent project to obtain sensible defaults. The paren 阅读全文
posted @ 2018-03-14 23:10 月关莫利亚 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Spring 入门学习 一、准备工作 1.安装jdk 1.8+ 以上版本 2.安装maven 3.2+ 以上版本 3.下载eclipse 并配置好maven 二、搭建项目 可以在eclipse中新建maven项目或者 在https://start.spring.io/ 网址中生成项目 以生成的项目为 阅读全文
posted @ 2018-03-13 23:07 月关莫利亚 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Spring 容器 spring 有两个核心接口:BeanFactory 和 ApplicationContext,其中ApplicationContext 是 BeanFactory的子接口,它们都代表Spring容器, spring 容器是生产Bean实例的工厂,并管理容器中的Bean。 1.B 阅读全文
posted @ 2018-02-28 21:28 月关莫利亚 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 依赖注入 依赖注入的方式主要有两种,setter注入和构造器注入 1.setter注入 setter注入指的是通过成员变量的setter方法来注入被依赖的对象 首先定义两个接口: 定义实现类 配置文件中配置并注入bean 测试: 结果: Spring会自动检测<bean>元素中的<property> 阅读全文
posted @ 2017-09-06 23:19 月关莫利亚 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1.Spring 简介 Spring 是为企业提供的一个轻量级的解决方案,包括:基于依赖注入的核心机制,基于AOP的声明式事务管理, 与多种持久层技术的集合以及优秀的WEB MVC框架等。 Spring 框架的组成结构: 2.Spring 准备工作 1)首先在官网下载Spring 压缩文件并解压 2 阅读全文
posted @ 2017-08-31 23:04 月关莫利亚 阅读(298) 评论(0) 推荐(0) 编辑
摘要: IF(expr,v1,v2) expr表达式为true时返回v1,否则返回v2 IFNULL(v1,v2) 如果v1为NULL,返回v2 ;v1不为NULL 则返回v1 CASE expr WHEN v1 THEN r1 [WHEN v2 THEN r2][......] [ELSE m] END 阅读全文
posted @ 2017-07-04 14:31 月关莫利亚 阅读(243) 评论(0) 推荐(0) 编辑
摘要: CURDATE()、CURRENT_DATE() 返回当前的日期 ‘YYYY-MM-DD’ CURTIME(),CURRENT_TIME() 返回当前时间 ‘HH:MM:SS’ CURRENT_TIMESTAMP() LOCALTIME() NOW() SYSDATE() 均返回当前日期和时间 ‘Y 阅读全文
posted @ 2017-07-03 23:57 月关莫利亚 阅读(347) 评论(0) 推荐(0) 编辑