<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>爱周末</title>
	<atom:link href="http://zhoumo123.cn/feed" rel="self" type="application/rss+xml" />
	<link>http://zhoumo123.cn</link>
	<description>知识分享，共同进步。zhoumo123.cn</description>
	<lastBuildDate>Thu, 07 Nov 2019 05:53:49 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.1</generator>
	<item>
		<title>@spring.active@  Failed to load property source from location &#8216;classpath:/application.yml&#8217;</title>
		<link>http://zhoumo123.cn/spring-boot/3649.html</link>
		<comments>http://zhoumo123.cn/spring-boot/3649.html#comments</comments>
		<pubDate>Thu, 07 Nov 2019 03:22:24 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[spring boot]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3649</guid>
		<description><![CDATA[spring boot启动报错 [restartedMain] ERROR org.springframework.boot.SpringApplication &#8211; Application run failed java.lang.IllegalStateException: Failed to load property source from location &#8216;classpath:/application.yml&#8217; Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scannin ...  <a href="http://zhoumo123.cn/spring-boot/3649.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p><strong>spring boot启动报错</strong></p>
<p>[restartedMain] ERROR org.springframework.boot.SpringApplication &#8211; Application run failed<br />
java.lang.IllegalStateException: Failed to load property source from location &#8216;classpath:/application.yml&#8217;</p>
<p>Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token<br />
found character &#8216;@&#8217; that cannot start any token. (Do not use @ for indentation)<br />
in &#8216;reader&#8217;, line 17, column 13:<br />
active: @spring.active@<br />
^</p>
<p><strong>解决办法：</strong></p>
<p><strong>方式一：</strong></p>
<p>在 application.yml中 将 <span style="color: #3366ff;"><strong>active: @spring.active@ </strong><span style="color: #000000;">加上英文引号，</span></span></p>
<p>改为 <strong><span style="color: #3366ff;">active: &#8220;@spring.active@&#8221;</span></strong></p>
<p><strong>方式二：</strong></p>
<p>使用阿里云的maven仓库，在项目根目录右键，并点击maven的reimport。</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2019/11/spring-boot.jpg"><img class="alignnone wp-image-3658 size-full" title="@spring.active@" src="http://zhoumo123.cn/wp-content/uploads/2019/11/spring-boot.jpg" alt="spring-boot @spring.active@" width="619" height="291" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/spring-boot/3649.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String&#8230;类型后面三个点(String&#8230;)和数组(String[])的区别</title>
		<link>http://zhoumo123.cn/java/3644.html</link>
		<comments>http://zhoumo123.cn/java/3644.html#comments</comments>
		<pubDate>Thu, 09 Aug 2018 01:03:51 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3644</guid>
		<description><![CDATA[类型后面三个点(String…)，是从Java 5开始，Java语言对方法参数支持一种新写法，叫可变长度参数列表，其语法就是类型后跟…，表示此处接受的参数为0到多个Object类型的对象，或者是一个Object[]。 例如我们有一个方法叫做test(String…strings)，那么你还可以写方法test()，但你不能写test(String[] strings)，这样会出编译错误，系统提示出现重复的方法。 在使用的时候，对于test(String…strings)，你可以直接用test()去调用，标示没有参数，也可以用去test(“aaa”)，也可以用test(new String[]{“ ...  <a href="http://zhoumo123.cn/java/3644.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>类型后面三个点(String…)，是从Java 5开始，Java语言对方法参数支持一种新写法，叫可变长度参数列表，其语法就是类型后跟…，表示此处接受的参数为0到多个Object类型的对象，或者是一个Object[]。 例如我们有一个方法叫做test(String…strings)，那么你还可以写方法test()，但你不能写test(String[] strings)，这样会出编译错误，系统提示出现重复的方法。</p>
<p>在使用的时候，对于test(String…strings)，你可以直接用test()去调用，标示没有参数，也可以用去test(“aaa”)，也可以用test(new String[]{“aaa”,”bbb”})。</p>
<p>另外如果既有test(String…strings)函数，又有test()函数，我们在调用test()时，会优先使用test()函数。只有当没有test()函数式，我们调用test()，程序才会走test(String…strings)。</p>
<pre class="brush: java; title: ; notranslate">

public class Test003 {

private Test003(){
test();
test(&quot;a&quot;,&quot;b&quot;);
test(new String[]{&quot;aaa&quot;,&quot;bbb&quot;});
test(&quot;ccc&quot;);
}

private void test(){
System.out.println(&quot;test&quot;);
}

private void test(String...strings){
for(String str:strings){
System.out.print(str + &quot;, &quot;);
}
System.out.println();
}
public static void main(String[] args) {
new Test003();
}

}

</pre>
<p>来源：https://blog.csdn.net/zhangdongnihao/article/details/74295696</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/java/3644.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决The user specified as a definer (&#8216;root&#8217;@&#8217;%&#8217;) does not exist 问题</title>
		<link>http://zhoumo123.cn/mysql/3640.html</link>
		<comments>http://zhoumo123.cn/mysql/3640.html#comments</comments>
		<pubDate>Wed, 18 Jul 2018 03:31:05 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3640</guid>
		<description><![CDATA[Error querying database. Cause: java.sql.SQLException: The user specified as a definer (&#8216;root&#8217;@&#8217;%&#8217;) does not exist ### Cause: java.sql.SQLException: The user specified as a definer (&#8216;root&#8217;@&#8217;%&#8217;) does not exist 遇到The user specified as a definer (&#8216;r ...  <a href="http://zhoumo123.cn/mysql/3640.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>Error querying database. Cause: java.sql.SQLException: The user specified as a definer (&#8216;root&#8217;@&#8217;%&#8217;) does not exist<br />
### Cause: java.sql.SQLException: The user specified as a definer (&#8216;root&#8217;@&#8217;%&#8217;) does not exist</p>
<p>遇到The user specified as a definer (&#8216;root&#8217;@&#8217;%&#8217;) does not exist 问题，原因是没有权限，解决方法如下：<br />
<strong>1、添加访问权限</strong></p>
<p>执行SQL：<span style="color: #3366ff;">grant all privileges on *.* to root@&#8221;%&#8221; identified by &#8220;.&#8221;;</span></p>
<p><strong>2、更新权限</strong><br />
执行SQL： <span style="color: #3366ff;">flush privileges;</span></p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2018/07/sql.jpg"><img class="alignnone size-full wp-image-3641" src="http://zhoumo123.cn/wp-content/uploads/2018/07/sql.jpg" alt="sql" width="628" height="240" /></a></p>
<p>问题解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/mysql/3640.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>spring mvc @ResponseBody 返回JSON数据 The resource identified by&#8230;</title>
		<link>http://zhoumo123.cn/spring-mvc/3633.html</link>
		<comments>http://zhoumo123.cn/spring-mvc/3633.html#comments</comments>
		<pubDate>Mon, 26 Mar 2018 12:06:28 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[spring mvc]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3633</guid>
		<description><![CDATA[在springmvc 通过URL请求数据返回JSON时，报错 The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request &#8220;accept&#8221; headers. 问题原因为未在pom文件中引入json的转换包。 解决办法： 1、在pom.xml中添加json所需要的依赖 2、spring-mvc.xml 加入： 配置后，成功返回： &#160; &#038;nbsp ...  <a href="http://zhoumo123.cn/spring-mvc/3633.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>在springmvc 通过URL请求数据返回JSON时，报错 The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request &#8220;accept&#8221; headers.</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2018/03/status406.jpg"><img class="alignnone size-full wp-image-3634" src="http://zhoumo123.cn/wp-content/uploads/2018/03/status406.jpg" alt="status406" width="620" height="209" /></a></p>
<p>问题原因为未在pom文件中引入json的转换包。<br />
<strong>解决办法：</strong><br />
1、在pom.xml中添加json所需要的依赖</p>
<pre class="brush: java; title: ; notranslate">
&lt;dependency&gt;
  &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
  &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
  &lt;version&gt;2.7.3&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
  &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
  &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
  &lt;version&gt;2.7.3&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
  &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
  &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
  &lt;version&gt;2.7.3&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p>2、spring-mvc.xml 加入：</p>
<pre class="brush: java; title: ; notranslate">
	&lt;bean
		class=&quot;org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter&quot;&gt;
		&lt;property name=&quot;messageConverters&quot;&gt;
			&lt;list&gt;
				&lt;ref bean=&quot;mappingJacksonHttpMessageConverter&quot; /&gt;
			&lt;/list&gt;
		&lt;/property&gt;
	&lt;/bean&gt;

	&lt;bean id=&quot;mappingJacksonHttpMessageConverter&quot;
		class=&quot;org.springframework.http.converter.json.MappingJackson2HttpMessageConverter&quot;&gt;
		&lt;property name=&quot;supportedMediaTypes&quot;&gt;
			&lt;list&gt;
				&lt;value&gt;application/json;charset=UTF-8&lt;/value&gt;
			&lt;/list&gt;
		&lt;/property&gt;
	&lt;/bean&gt;

</pre>
<p>配置后，成功返回：</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2018/03/spring-json.jpg"><img class="alignnone size-full wp-image-3635" src="http://zhoumo123.cn/wp-content/uploads/2018/03/spring-json.jpg" alt="spring-json" width="426" height="43" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/spring-mvc/3633.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>slf4j下载及LoggerFactory.getLogger说明</title>
		<link>http://zhoumo123.cn/java/3628.html</link>
		<comments>http://zhoumo123.cn/java/3628.html#comments</comments>
		<pubDate>Wed, 20 Dec 2017 03:46:40 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[slf4j]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3628</guid>
		<description><![CDATA[LoggerFactory.getLogger使用指定类初始化日志对象，在日志输出的时候，可以打印出日志信息所在类。如： private static final Logger logger = LoggerFactory.getLogger(Slf4jDemo.class); logger.debug(&#8220;日志信息&#8221;); 将会打印出: Slf4jDemo : 日志信息 slf4j下载 下载地址：https://www.slf4j.org/download.html &#160; &#160;]]></description>
				<content:encoded><![CDATA[<p>LoggerFactory.getLogger使用指定类初始化日志对象，在日志输出的时候，可以打印出日志信息所在类。如：<br />
<strong>private static final Logger logger = LoggerFactory.getLogger(Slf4jDemo.class);</strong><br />
logger.debug(&#8220;日志信息&#8221;);<br />
将会打印出: Slf4jDemo : 日志信息</p>
<p><strong>slf4j下载</strong></p>
<p>下载地址：https://www.slf4j.org/download.html</p>
<p>&nbsp;</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2017/12/slf4j-download1.jpg"><img class="alignnone wp-image-3630 size-full" title="slf4j下载" src="http://zhoumo123.cn/wp-content/uploads/2017/12/slf4j-download1.jpg" alt="slf4j-download" width="576" height="515" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/java/3628.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON.parseObject(json字符串，对象.class)将str转对象 (JSONObject.parseObject)</title>
		<link>http://zhoumo123.cn/java/3626.html</link>
		<comments>http://zhoumo123.cn/java/3626.html#comments</comments>
		<pubDate>Wed, 20 Dec 2017 03:18:59 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JSON.parseObject]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3626</guid>
		<description><![CDATA[将JSON字符串转换成java中的POJO对象。在fastJson中已经有提供好的方法：JSON.parseObject(json字符串，对象.class);使用方式如下： 运行后结果如下： Name = james, age = 12 使用jar包：fastjson-1.1.36.jar包 parseObject(String str)的作用 JSON.parseObject（String str）是将str转化为相应的JSONObject对象，其中str是“键值对”形式的json字符串，转化为JSONObject对象之后就可以使用其内置的方法，进行各种处理了。 JSON.parseObje ...  <a href="http://zhoumo123.cn/java/3626.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>将JSON字符串转换成java中的POJO对象。在fastJson中已经有提供好的方法：<strong>JSON.parseObject</strong>(json字符串，对象.class);使用方式如下：</p>
<pre class="brush: java; title: ; notranslate">
package json;

import com.alibaba.fastjson.JSON;

public class TestJson {

    String name;
    String age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public static void main(String[] args) {
        String jsonStr = &quot;{\&quot;name\&quot;:\&quot;james\&quot;, \&quot;age\&quot;:12}&quot;;
        TestJson test = JSON.parseObject(jsonStr, TestJson.class);
        System.out.printf(&quot;Name = %s, age = %s&quot;, test.getName(), test.getAge());
    }
}
</pre>
<p><strong>运行后结果如下：</strong></p>
<p>Name = james, age = 12<br />
使用jar包：fastjson-1.1.36.jar包</p>
<p><strong>parseObject(String str)的作用</strong><br />
JSON.parseObject（String str）是将str转化为相应的JSONObject对象，其中str是“键值对”形式的json字符串，转化为JSONObject对象之后就可以使用其内置的方法，进行各种处理了。</p>
<p><strong>JSON.parseObject(String str)与 JSONObject.parseObject(String str)的区别</strong><br />
根据源码显示：JSON是一个抽象类，JSON中有一个静态方法parseObject（String text），将text解析为一个JSONObject对象并返回；JSONObject是一个继承自JSON的类，当调用JSONObject.parseObject（result）时，会直接调用父类的parseObject（String text）。所以两者没什么区别，一个是用父类去调用父类自己的静态的parseObject（String text），一个是用子类去调用父类的静态parseObject（String text），两者调的是同一个方法。</p>
<p>参考：</p>
<p>https://segmentfault.com/q/1010000005733442</p>
<p>http://blog.csdn.net/dafeige8/article/details/73924034</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/java/3626.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>map遍历4种方式获取map的key与value</title>
		<link>http://zhoumo123.cn/java/3617.html</link>
		<comments>http://zhoumo123.cn/java/3617.html#comments</comments>
		<pubDate>Tue, 07 Nov 2017 11:35:43 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3617</guid>
		<description><![CDATA[map遍历的方式有多种，今天分享一下map遍历的4种方式，如何获取map的key与value。 方式1：通过Map.keySet遍历key和value 方式二：通过Map.entrySet使用iterator遍历key和value 方式三：推荐，尤其是容量大时 方式四：通过Map.values()遍历所有的value，但不能遍历key &#160; &#160; 来源：http://www.cnblogs.com/blest-future/p/4628871.html]]></description>
				<content:encoded><![CDATA[<p>map遍历的方式有多种，今天分享一下map遍历的4种方式，如何获取map的key与value。</p>
<pre class="brush: java; title: ; notranslate">
        Map&lt;Integer, String&gt; map = new HashMap&lt;Integer, String&gt;();
        map.put(1, &quot;a&quot;);
        map.put(2, &quot;b&quot;);
        map.put(3, &quot;ab&quot;);
        map.put(4, &quot;ab&quot;);
        map.put(4, &quot;ab&quot;);
        System.out.println(map.size());
        </pre>
<p><strong>方式1：通过Map.keySet遍历key和value</strong></p>
<pre class="brush: java; title: ; notranslate">
/*
* Set set = map.keySet(); //得到所有key的集合
*
* for (Integer in : set) { String str = map.get(in);
* System.out.println(in + &quot; &quot; + str); }
*/
System.out.println(&quot;通过Map.keySet遍历key和value：&quot;);
for (Integer in : map.keySet()) {
//map.keySet()返回的是所有key的值
String str = map.get(in);//得到每个key多对用value的值
System.out.println(in + &quot; &quot; + str);
}

</pre>
<p><strong>方式二：通过Map.entrySet使用iterator遍历key和value</strong></p>
<pre class="brush: java; title: ; notranslate">

System.out.println(&quot;通过Map.entrySet使用iterator遍历key和value：&quot;);
Iterator&lt;Map.Entry&lt;Integer, String&gt;&gt; it = map.entrySet().iterator();
while (it.hasNext()) {
    Map.Entry&lt;Integer, String&gt; entry = it.next();
    System.out.println(&quot;key= &quot; + entry.getKey() +
    &quot; and value= &quot; + entry.getValue());
}

</pre>
<p><strong>方式三：推荐，尤其是容量大时</strong></p>
<pre class="brush: java; title: ; notranslate">

System.out.println(&quot;第三种：通过Map.entrySet遍历key和value&quot;);
for (Map.Entry&lt;Integer, String&gt; entry : map.entrySet()) {
     //Map.entry&lt;Integer,String&gt; 映射项（键-值对）  
     //有几个方法：用上面的名字entry
    //entry.getKey() ;entry.getValue(); entry.setValue();
    //map.entrySet()  返回此映射中包含的映射关系的 Set视图。
    System.out.println(&quot;key= &quot; + entry.getKey() + &quot; and value= &quot;
                    + entry.getValue());
}
</pre>
<p><strong>方式四：通过Map.values()遍历所有的value，但不能遍历key</strong></p>
<pre class="brush: java; title: ; notranslate">
System.out.println(&quot;通过Map.values()遍历所有的value，但不能遍历key&quot;);
for (String v : map.values()) {
    System.out.println(&quot;value= &quot; + v);
}
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2017/11/java-map1.png"><img class="alignnone wp-image-3621 size-full" title="map遍历4种方式获取map的key与value" src="http://zhoumo123.cn/wp-content/uploads/2017/11/java-map1.png" alt="map遍历4种方式获取map的key与value" width="631" height="321" /></a></p>
<p>来源：http://www.cnblogs.com/blest-future/p/4628871.html</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/java/3617.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Map.containsKey方法(判断Map集合对象中是否包含指定的键名)</title>
		<link>http://zhoumo123.cn/java/3614.html</link>
		<comments>http://zhoumo123.cn/java/3614.html#comments</comments>
		<pubDate>Thu, 26 Oct 2017 06:27:53 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[Map.containsKey]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3614</guid>
		<description><![CDATA[Map集合允许值对象为null，并且没有个数限制，所以当get()方法的返回值为null时，可能有两种情况，一种是在集合中没有该键对象，另一种是该键对象没有映射任何值对象，即值对象为null。因此，在Map集合中不应该利用get()方法来判断是否存在某个键，而应该利用containsKey()方法来判断。 该方法判断Map集合对象中是否包含指定的键名。如果Map集合中包含指定的键名，则返回true，否则返回false。 语法  containsKey(Object key)  &#160;]]></description>
				<content:encoded><![CDATA[<p>Map集合允许值对象为null，并且没有个数限制，所以当get()方法的返回值为null时，可能有两种情况，一种是在集合中没有该键对象，另一种是该键对象没有映射任何值对象，即值对象为null。因此，在Map集合中不应该利用get()方法来判断是否存在某个键，而应该利用<strong>containsKey()</strong>方法来判断。</p>
<p>该方法判断Map集合对象中是否包含指定的键名。如果Map集合中包含指定的键名，则返回true，否则返回false。</p>
<p><strong>语法  containsKey(Object key) </strong></p>
<pre class="brush: java; title: ; notranslate">

public static void main(String[] args) {

Map map = new HashMap();       //定义Map对象

map.put(&quot;apple&quot;, &quot;新鲜的苹果&quot;);      //向集合中添加对象

map.put(&quot;computer&quot;, &quot;配置优良的计算机&quot;);

map.put(&quot;book&quot;, &quot;堆积成山的图书&quot;);

map.put(&quot;time&quot;, new Date());

String key = &quot;book&quot;;

boolean contains = map.containsKey(key);    //判断是否包含指定的键值

if (contains) {         //如果条件为真

System.out.println(&quot;在Map集合中包含键名&quot; + key); //输出信息

} else {

System.out.println(&quot;在Map集合中不包含键名&quot; + key);

}

}
</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/java/3614.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下启动SVN服务重启SVN服务命令</title>
		<link>http://zhoumo123.cn/svn/3609.html</link>
		<comments>http://zhoumo123.cn/svn/3609.html#comments</comments>
		<pubDate>Mon, 25 Sep 2017 03:13:25 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3609</guid>
		<description><![CDATA[在Linux下安装SVN后，如何启动SVN服务，如何重启SVN服务命令如下： 启动SVN服务： svnserve -d -r /usr/svn  // -d 表示守护进程， -r 表示在后台执行 ； /usr/svn 为所在路径 //指定其他端口号启动服务器 svnserve -d -r /usr/svn &#8211;listen-port 3391 重启SVN服务： ps -aux&#124;grep svnserve kill -9 ID号 svnserve -d -r /usr/svn &#160; 以上为linux启动svn服务命令。]]></description>
				<content:encoded><![CDATA[<p>在Linux下安装SVN后，如何启动SVN服务，如何重启SVN服务命令如下：</p>
<p><strong>启动SVN服务：</strong></p>
<p><span style="color: #3366ff;"><strong>svnserve -d -r /usr/svn </strong></span></p>
<p>// -d 表示守护进程， -r 表示在后台执行 ； /usr/svn 为所在路径</p>
<p>//指定其他端口号启动服务器</p>
<p><strong><span style="color: #3366ff;">svnserve -d -r /usr/svn &#8211;listen-port 3391</span></strong></p>
<p><strong>重启SVN服务：</strong></p>
<p><strong><span style="color: #3366ff;">ps -aux|grep svnserve</span></strong></p>
<p><strong><span style="color: #3366ff;">kill -9 ID号</span></strong></p>
<p><strong><span style="color: #3366ff;">svnserve -d -r /usr/svn</span></strong></p>
<p>&nbsp;</p>
<p>以上为linux启动svn服务命令。</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/svn/3609.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修改my.ini导致MySQL57服务无法启动,服务没有报告任何错误 </title>
		<link>http://zhoumo123.cn/mysql/3594.html</link>
		<comments>http://zhoumo123.cn/mysql/3594.html#comments</comments>
		<pubDate>Fri, 09 Jun 2017 13:31:41 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3594</guid>
		<description><![CDATA[安装MySQL57数据库后，更改my.ini文件使数据库表实现区分大小写。在修改my.ini后导致MySQL57服务无法启动,服务没有报告任何错误 最后各种尝试发现是配置参数错误导致MySQL57服务无法启动。 查看了官方文档： Use lower_case_table_names=1 on all systems. The main disadvantage with this is that when you use SHOW TABLES or SHOW DATABASES, you do not see the names in their original lettercase. U ...  <a href="http://zhoumo123.cn/mysql/3594.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>安装MySQL57数据库后，更改my.ini文件使数据库表实现区分大小写。在修改my.ini后导致MySQL57服务无法启动,服务没有报告任何错误 最后各种尝试发现是配置参数错误导致MySQL57服务无法启动。</p>
<div id="attachment_3595" style="width: 298px" class="wp-caption alignnone"><a href="http://zhoumo123.cn/wp-content/uploads/2017/06/err.jpg"><img class="wp-image-3595 size-full" title="MySQL57服务无法启动" src="http://zhoumo123.cn/wp-content/uploads/2017/06/err.jpg" alt="MySQL57服务无法启动" width="288" height="101" /></a><p class="wp-caption-text">MySQL57服务无法启动</p></div>
<p>查看了官方文档：</p>
<p>Use<span style="color: #000000;"><strong> lower_case_table_names=1 on all systems</strong>. </span>The main disadvantage with this is that when you use SHOW TABLES or SHOW DATABASES, you do not see the names in their original lettercase.</p>
<p>Use<strong><span style="color: #000000;"> lower_case_table_names=0 on Unix</span></strong> and<strong><span style="color: #000000;"> lower_case_table_names=2 on Windows.</span></strong> This preserves the lettercase of database and table names. The disadvantage of this is that you must ensure that your statements always refer to your database and table names with the correct lettercase on Windows. If you transfer your statements to Unix, where lettercase is significant, they do not work if the lettercase is incorrect.</p>
<p>在Windows下配置<strong> lower_case_table_names=2</strong>。</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2017/06/mysql.jpg"><img class="alignnone size-full wp-image-3596" src="http://zhoumo123.cn/wp-content/uploads/2017/06/mysql.jpg" alt="mysql" width="303" height="109" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/mysql/3594.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
