一本色道久久88—综合亚洲精品,亚洲国产精品午夜电影 ,亚洲图片中文字幕http://m.tkk7.com/liufuxi/技術點滴zh-cnSun, 11 May 2025 09:28:11 GMTSun, 11 May 2025 09:28:11 GMT60mysql的一次優化http://m.tkk7.com/liufuxi/archive/2017/12/04/432934.htmlliufxliufxMon, 04 Dec 2017 09:16:00 GMThttp://m.tkk7.com/liufuxi/archive/2017/12/04/432934.htmlhttp://m.tkk7.com/liufuxi/comments/432934.htmlhttp://m.tkk7.com/liufuxi/archive/2017/12/04/432934.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/432934.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/432934.html

liufx 2017-12-04 17:16 發表評論
]]>
mongodb3.4 安裝及用戶名密碼設置http://m.tkk7.com/liufuxi/archive/2016/12/20/432147.htmlliufxliufxTue, 20 Dec 2016 08:10:00 GMThttp://m.tkk7.com/liufuxi/archive/2016/12/20/432147.htmlhttp://m.tkk7.com/liufuxi/comments/432147.htmlhttp://m.tkk7.com/liufuxi/archive/2016/12/20/432147.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/432147.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/432147.htmlhttps://www.mongodb.com/download-center?jmp=nav#community

1.解壓
這里寫圖片描述
修改文件名為mongo3.2.5,執行命令如下:
mv mongodb-linux-i686-3.2.5 mongo3.2.5

2.創建組mongoDB與用戶mongoDB、文件夾data以及log
用于與組是為了便于管理MongoDB
data用于存放mongoDB數據。
log用于記錄mongoDB日志。
這里寫圖片描述
3.指定組、用戶
這里寫圖片描述
4.啟動mongo服務命令

bin/mongod --dbpath=/usr/local/mongo-3.25/data/ --logpath=/usr/local/mongo-3.25/log/mongo.log  --journal  --storageEngine=mmapv1

注意:因為我使用的是linux32位系統的,故默認的存儲引擎wiredTiger是不支持的。需要指定存儲引擎。如果不指定可能會報以下錯誤:
這里寫圖片描述
開啟MongoDB服務成功后,截圖如下:
這里寫圖片描述
連接mongo服務
上面啟動MongoDB之后,需要重新打開一個窗口,進行連接。
這里寫圖片描述
當提示如下信息,代表連接成功。
這里寫圖片描述
當然,也可以通過瀏覽器訪問以下網址,查看輸出結果
http://192.168.153.140:27017
這里寫圖片描述



初始安裝的時候沒有admin數據庫


開啟認證

修改配置文件/etc/MongoDB.conf

打開auth的注釋,設置為auth = true


重啟mongodb

sudo service mongodb restart


添加管理員

使用命令mongo進入命令行

創建第一個用戶,該用戶需要有用戶管理權限

這里設置其角色為root

use admin
db.createUser({user:"admin",pwd:"password",roles:["root"]})

新增的用戶在system.users中

> db.getCollectionNames()
[ "system.indexes", "system.users", "system.version" ]


第一個用戶添加完成后,便需要認證才能繼續添加其他用戶

使用db.auth("admin", "password")認證


添加數據庫用戶

為其他數據庫添加用戶,添加用戶前需要切換到該數據庫

這里設置其角色為dbOwner

use testdb1

db.createUser({user: "testdb1u1", pwd: "xyz123", roles: [{ role: "dbOwner", db: "testdb1" }]})


查看用戶

> use admin
switched to db admin
> db.system.users.find()
{ "_id" : "admin.admin", "user" : "admin", "db" : "admin", "credentials" : { "SCRAM-SHA-1" : { "iterationCount" : 10000, "salt" : "Fdh2ldIW3Aw8Cxz9Dt+96g==", "storedKey" : "zbkfj6ZQH1xwGoOg8JJ6OjtR3Cs=", "serverKey" : "yqkqHABZ64rEeq1X0htOAtUnwFU=" } }, "roles" : [ { "role" : "root", "db" : "admin" } ] }
{ "_id" : "testdb1.testdb1u1", "user" : "testdb1u1", "db" : "testdb1", "credentials" : { "SCRAM-SHA-1" : { "iterationCount" : 10000, "salt" : "Xxt2uET3jRtAYVigyLUydw==", "storedKey" : "yinLG61nRFzfC+3NtB5p9RR+avM=", "serverKey" : "OX/Pdft7JWJm/g0jg07q49OC4c8=" } }, "roles" : [ { "role" : "dbOwner", "db" : "testdb1" } ] }



參考地址:
http://blog.csdn.net/zahuopuboss/article/details/53635078
http://blog.csdn.net/hsd2012/article/details/51286495






liufx 2016-12-20 16:10 發表評論
]]>
spring4 aop配置不起作用的兩種解決方法http://m.tkk7.com/liufuxi/archive/2016/11/22/432005.htmlliufxliufxTue, 22 Nov 2016 01:44:00 GMThttp://m.tkk7.com/liufuxi/archive/2016/11/22/432005.htmlhttp://m.tkk7.com/liufuxi/comments/432005.htmlhttp://m.tkk7.com/liufuxi/archive/2016/11/22/432005.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/432005.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/432005.html    spring-servlet.xml 中加入 <import resource="ApplicationContext.xml" />
    ApplicationContext.xml 中把其它的xml文件import進來
    web.xml 
    SpringMVC核心分發器 加入參數 <param-value>classpath:spring-mvc.xml</param-value>
    不加載    <param-value>classpath*:/spring-context*.xml</param-value>
    controller/service等都在mvc中加載
     <context:component-scan base-package="com.mweb.**.controller" />
    <context:component-scan base-package="com.mweb.**.service" />。。。。需要加載的@Component等
    加入:
     <aop:aspectj-autoproxy proxy-target-class="true" />

二、spring-context*.xml / spring-mvc.xml 分開加載掃描的方法 
web.xml 中:
 <context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>classpath*:/spring-context*.xml</param-value>
 </context-param>
 <listener> 
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>    必須加入才行
 </listener>

 <servlet>
  <servlet-name>spring</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:spring-mvc.xml</param-value>
        </init-param>
  <load-on-startup>1</load-on-startup>
 </servlet>

spring-mvc.xml 中:

 <context:component-scan base-package="com.mweb.**.controller" />   掃描 controller

 <aop:aspectj-autoproxy />         aop 參考下面的也行

  1. <aop:aspectj-autoproxy proxy-target-class="true">  
  2.         <aop:include name="controllerAspect"/>     @Aspect聲明的類  
  3.     </aop:aspectj-autoproxy> 


 

spring-context.xml中:
     <context:component-scan base-package="com.mweb.**.extension,
                 com.mweb.**.service,
                 com.mweb.base.aspect,
                 com.mweb.base.shiro.realm" />
 <aop:aspectj-autoproxy proxy-target-class="true" />
這樣就可以了







liufx 2016-11-22 09:44 發表評論
]]>
jquery 刪除多個 checkbox復選框多選等http://m.tkk7.com/liufuxi/archive/2016/10/27/431939.htmlliufxliufxThu, 27 Oct 2016 05:22:00 GMThttp://m.tkk7.com/liufuxi/archive/2016/10/27/431939.htmlhttp://m.tkk7.com/liufuxi/comments/431939.htmlhttp://m.tkk7.com/liufuxi/archive/2016/10/27/431939.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/431939.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/431939.html

/*多條-刪除*/
function deleteBatch(){
 layer.confirm('確認要刪除嗎?',function(index){

   var idList = new Array(); 

   // 獲得選中的ID值
   $("input[name='id']:checkbox:checked").each(function(){
    idList.push(this.value); 
   });

   $.ajax({
          type:"post",
          url:"${CONTEXT_PATH}/sys/menu/deletebatch.html",
          data: $('#form-menu').serialize(),//表單數據 
          data: {"idList":idList},
          //cache:false,
          success:function(msg){
              if(msg=="success"){
               // 延時1S刷新
               setTimeout('location.replace(location.href)', 1000);
            layer.msg('全部刪除成功!',{icon:1,time:1000});
              }
              if(msg=="error"){
                  layer.msg('異常!');
              }
          }
      });
 });
}



后臺controller:
 @RequiresPermissions("sys:menu:edit")
    @ResponseBody
    @RequestMapping("/deletebatch")
    public String deletebatch(@RequestParam("idList[]") List<String> objs,ModelMap modelMap, HttpServletRequest request) throws Exception {
     String retStr = "error";
     try{
   menuService.removeMulti(objs);
   retStr = "success" ;
     }catch(Exception e) {
      logger.info(e.getMessage());
     }
     return retStr;
    }

后臺service:

 @CacheEvict(value="defaultCache",allEntries=true)
 public void removeMulti(List<String> objs) {
  
  BasicDBList basicDBList=new BasicDBList();
  for(String id : objs) {
   basicDBList.add(new BasicDBObject("id",id));
  }

        DBObject obj =new BasicDBObject();
        obj.put("$or", basicDBList);
        Query query=new BasicQuery(obj);

  mongoTemplate.remove(query,Menu.class);
 } 

如果不跳轉,應該把ajax里面的dataType改成html ,json時返回不正確






liufx 2016-10-27 13:22 發表評論
]]>
jquery ajax 提交不起作用的解決方法http://m.tkk7.com/liufuxi/archive/2016/10/27/431936.htmlliufxliufxWed, 26 Oct 2016 23:46:00 GMThttp://m.tkk7.com/liufuxi/archive/2016/10/27/431936.htmlhttp://m.tkk7.com/liufuxi/comments/431936.htmlhttp://m.tkk7.com/liufuxi/archive/2016/10/27/431936.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/431936.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/431936.html

 

/** ajax登錄,并jquery md5 加密密碼 */
function loginsubmit() {
 var salt=$("#username").val(); 
    var pwd=$("#password").val();  
    var md5Pwd=$.md5(pwd+salt);
   
    var validateCode=$("#validateCode").val();
    var rememberMe=$("#rememberMe").val();
   
 data="username="+  salt
  + "&password=" + md5Pwd
  + "&validateCode=" + validateCode
  + "&rememberMe=" + rememberMe;

 $.ajax({
     type: "POST",
     url: "loginsubmit",
     dataType:'html',
     data: data,
     contentType:"application/x-www-form-urlencoded;charset=UTF-8",
     success: function(msg){
      if(msg=="ok") {
       location.href = "index";
      }else if (msg=="errorcode"){
       alert("驗證碼無效!");
      }
     },
     error: function (XMLHttpRequest, textStatus, errorThrown) {
               alert(XMLHttpRequest.status);
               alert(XMLHttpRequest.readyState);
               alert(textStatus);
           }
 });
}

以上代碼中url為 loginsubmit.html 去掉".html"即可提交 ,后臺代碼用的@ResponseBody注解




liufx 2016-10-27 07:46 發表評論
]]>
shiro 在spring的unauthorizedUrl配置后不起作用http://m.tkk7.com/liufuxi/archive/2016/10/26/431931.htmlliufxliufxWed, 26 Oct 2016 01:40:00 GMThttp://m.tkk7.com/liufuxi/archive/2016/10/26/431931.htmlhttp://m.tkk7.com/liufuxi/comments/431931.htmlhttp://m.tkk7.com/liufuxi/archive/2016/10/26/431931.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/431931.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/431931.html<property name="unauthorizedUrl" value="/sys/unauthorized"/> 不起作用

spring-mvc.xml 中加入:
 <!-- 異常處理 -->
 <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
  <property name="exceptionMappings">
   <props>
    <prop key="org.apache.shiro.authz.UnauthorizedException">jsp/unauthorized</prop>
    <prop key="org.apache.shiro.authz.UnauthenticatedException">jsp/unauthorized</prop>
    <prop key="org.apache.shiro.authz.AuthorizationException">jsp/unauthorized</prop>           
    <prop key="java.lang.Throwable">jsp/unauthorized</prop>
   </props>
   </property>
 </bean>

如果還不能解決:可以看一下web.xml中是否有:
 <error-page>
  <error-code>400</error-code>
  <location>/WEB-INF/template/common/errorPage.jsp</location>
 </error-page>
 <error-page>
  <error-code>404</error-code>
  <location>/WEB-INF/template/common/errorPage.jsp</location>
 </error-page>
 <error-page>
  <error-code>500</error-code>
  <location>/sys/unauthorized.html</location>
 </error-page>
都屏蔽掉,應該就好了









liufx 2016-10-26 09:40 發表評論
]]>
tomcat 中出現 consider increasing the maximum size of the cachehttp://m.tkk7.com/liufuxi/archive/2016/10/24/431919.htmlliufxliufxMon, 24 Oct 2016 08:06:00 GMThttp://m.tkk7.com/liufuxi/archive/2016/10/24/431919.htmlhttp://m.tkk7.com/liufuxi/comments/431919.htmlhttp://m.tkk7.com/liufuxi/archive/2016/10/24/431919.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/431919.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/431919.html在context.xml 中加入紅色的
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

    <Resources cachingAllowed="true" cacheMaxSize="100000" />


liufx 2016-10-24 16:06 發表評論
]]>
html中自動填充問題的解決方法http://m.tkk7.com/liufuxi/archive/2016/08/26/431681.htmlliufxliufxFri, 26 Aug 2016 06:20:00 GMThttp://m.tkk7.com/liufuxi/archive/2016/08/26/431681.htmlhttp://m.tkk7.com/liufuxi/comments/431681.htmlhttp://m.tkk7.com/liufuxi/archive/2016/08/26/431681.html#Feedback0http://m.tkk7.com/liufuxi/comments/commentRss/431681.htmlhttp://m.tkk7.com/liufuxi/services/trackbacks/431681.html
用戶名密碼郵件等自動填充問題的解決:
1. form 加入:autocomplete="off"屬性
2. 每個password中 加入 type="text" onfocus="this.type='password'" autocomplete="off" 屬性
3. password最上面加入一個不顯示的password:
<input type="password" name="password1000" style="display:none;width:0;height:0;">
4. 如果email或者username中 也自動填充 ,需要在下面加入一個不顯示的text,并且必須加上name屬性值 如:
<input type="text" name="email1000" style="display:none;width:0;height:0;" />

<form autocomplete="off">

<input type="text" autocomplete="off" class="post" style="WIDTH: 200px" maxlength="255" size="25" name="email" value="${u.email?default("")?html}" />
<input type="text" name="email1000" style="display:none;width:0;height:0;" />

<input type="password" name="password1000" style="display:none;width:0;height:0;">
<input type="text" onfocus="this.type='password'" autocomplete="off" />
</form>



liufx 2016-08-26 14:20 發表評論
]]>
主站蜘蛛池模板: 亚洲熟妇无码一区二区三区导航| 国产A在亚洲线播放| 亚洲三级中文字幕| 免费A级毛片无码专区| 亚洲第一AAAAA片| 老司机69精品成免费视频| 国产aⅴ无码专区亚洲av麻豆| 精品无码国产污污污免费网站国产| 亚洲精品国产精品国自产观看| 四虎精品成人免费视频| 久久久久亚洲精品男人的天堂| 99久久免费国产精精品| 亚洲AV无码专区国产乱码电影| 免费人成视频在线观看网站| 亚洲伦理一二三四| 免费无码黄动漫在线观看| 午夜亚洲国产精品福利| 亚洲国产精品无码久久青草| 在线观看免费无码视频| 亚洲黄色片免费看| 国产精品成人免费视频网站京东| 精品国产日韩亚洲一区91| 国产成人综合亚洲亚洲国产第一页| 波霸在线精品视频免费观看| 久久丫精品国产亚洲av| 日本一区二区三区免费高清| 色吊丝性永久免费看码| 亚洲AV综合色区无码一区| 亚洲黄色免费在线观看| 亚洲AV无码一区二区乱子仑| 综合亚洲伊人午夜网| 最近免费中文字幕大全免费版视频| 国产 亚洲 中文在线 字幕| 亚洲国产精品一区二区九九 | 亚洲成a人片在线观看天堂无码| 免费A级毛片无码A| 日韩电影免费在线观看| 天堂亚洲国产中文在线| 国产亚洲精品影视在线产品| 日本h在线精品免费观看| 男人免费视频一区二区在线观看 |