<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    風人園

    弱水三千,只取一瓢,便能解渴;佛法無邊,奉行一法,便能得益。
    隨筆 - 99, 文章 - 181, 評論 - 56, 引用 - 0
    數(shù)據(jù)加載中……

    2016年12月1日

    Spring boot+Spring Security 4配置整合實例

    http://blog.csdn.net/code__code/article/details/53885510

    1. 使用Spring Security管理用戶身份認證、登錄退出

    2. 用戶密碼加密及驗證

    3. 采用數(shù)據(jù)庫的方式實現(xiàn)Spring Securityremember-me功能

    4. 獲取登錄用戶信息。

    5.使用Spring Security管理url和權(quán)限

    posted @ 2018-03-19 21:02 風人園 閱讀(313) | 評論 (0)編輯 收藏

    spring security 參數(shù)配置

         摘要:         // 自定義登錄頁面          http.csrf().disable().formLogin().loginPage("/login")  //指定登錄頁的路徑&n...  閱讀全文

    posted @ 2018-03-19 20:33 風人園 閱讀(431) | 評論 (0)編輯 收藏

    spring quartz 串行配置

    <bean id="jobDetail7"class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">

                       <propertyname="targetObject" ref="billingBillTask"></property>

                       <propertyname="targetMethod" value="executeInternal" />

                       <propertyname="concurrent" value="false" />

             </bean>

             <beanid="billingBillTask"class="com.dangdang.tms.job.schedule.bms.BillingBillTask"/>

             <beanid="cronTriggerBean7" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">

                       <propertyname="jobDetail" ref="jobDetail7"></property>

                       <propertyname="cronExpression" value="0/5 * * * * ?"></property>

             </bean>

    參考 http://blog.csdn.net/lkforce/article/details/51841890

    posted @ 2018-03-12 19:58 風人園 閱讀(383) | 評論 (0)編輯 收藏

    spring 3.0 async 異步方法 設置

    為了解決一些比較費時且不是很緊要的任務,將此任務轉(zhuǎn)為異步任務處理,提高前端操作體驗。 spring 中 自帶注解 @Async. 配置如下 applicationContext.xml 中 增加 task的引用 如上配置之后,只需要在 需要進行異步調(diào)用的方法前面增加 注解就可以了。 @Async public void updateOrderBillItemPQty(String deptId, String orderNo, Integer orderItemSid, Double pQty) { 注:需要注意,同一個對象里面方法調(diào)用,不會作為異步方法執(zhí)行。

    posted @ 2017-05-24 14:27 風人園 閱讀(260) | 評論 (0)編輯 收藏

    android ResourceNotFoundException


    在對 TextView 或者 EditText 進行賦值時,調(diào)用setText()方法,一定要注意,使用String類型,不要使用int 或者long,否則 會出現(xiàn)找不到資源的異常。系統(tǒng)自動會將int作為一個資源ID,然后去R 里面找,結(jié)果找不到。

    posted @ 2016-12-21 20:48 風人園 閱讀(133) | 評論 (0)編輯 收藏

    android 系統(tǒng)提示對話框(AlertDialog)的使用(zt)

         摘要: http://blog.csdn.net/meng425841867/article/details/8523730 在按鍵單擊事件中添加創(chuàng)建對話框并設置相關屬性。        [java] view plain copy dialogButton=(Button)findViewBy...  閱讀全文

    posted @ 2016-12-02 12:54 風人園 閱讀(472) | 評論 (0)編輯 收藏

    Android 自定義ListView adapter(zt)

         摘要: http://daoshud1.iteye.com/blog/1874241 本文講實現(xiàn)一個自定義列表的Android程序,程序?qū)崿F(xiàn)一個使用自定義的適配器(Adapter)綁定 數(shù)據(jù),通過contextView.setTag綁定數(shù)據(jù)有按鈕的ListView。 系統(tǒng)顯示列表(ListView)時,首先會實例化一個適配器,本文將實例化一個自定義的適配器。實現(xiàn) 自定義適...  閱讀全文

    posted @ 2016-12-01 13:13 風人園 閱讀(164) | 評論 (0)編輯 收藏

    Android之SimpleAdapter簡單實例和SimpleAdapter參數(shù)說明(zt)

         摘要: http://blog.csdn.net/x605940745/article/details/11981049 SimpleAdapter的參數(shù)說明 第一個參數(shù) 表示訪問整個android應用程序接口,基本上所有的組件都需要 第二個參數(shù)表示生成一個Map(String ,Object)列表選項 第三個參數(shù)表示界面布局的id  表示該文件作為列表項的組件&...  閱讀全文

    posted @ 2016-12-01 13:12 風人園 閱讀(181) | 評論 (0)編輯 收藏

    android開發(fā)教程之listview使用方法

    首先是布局文件,這里需要兩個布局文件,一個是放置列表控件的Activity對應的布局文件 main.xml,另一個是ListView中每一行信息顯示所對應的布局 list_item.xml 這一步需要注意的問題是ListView 控件的id要使用Android系統(tǒng)內(nèi)置的 android:id="@android:id/list"

    main.xml
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width
    ="match_parent"
        android:layout_height
    ="match_parent"
        android:orientation
    ="vertical" >
            
    <ListView 
            
    android:id="@android:id/list"
            android:layout_width
    ="match_parent"
            android:layout_height
    ="match_parent"
            android:padding
    ="20dip"/>
    </LinearLayout>

    list_item.xml
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width
    ="match_parent"
    android:layout_height
    ="match_parent"
    android:orientation
    ="horizontal" >

    <TextView
    android:id="@+id/user_name"
    android:layout_width
    ="match_parent"
    android:layout_height
    ="match_parent"
    android:layout_weight
    ="1"/>
    <TextView
    android:id="@+id/user_id"
    android:layout_width
    ="match_parent"
    android:layout_height
    ="match_parent"
    android:layout_weight
    ="1"/>
    </LinearLayout>


    然后就設置MainActivity中的代碼了:基本思想就是先將數(shù)據(jù)添加到ArrayList中,然后在設置SimpleAdapter適配器完成設置,入下:

    package com.example.android_newlistview;

    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Map;

    import android.os.Bundle;
    import android.app.Activity;
    import android.app.ListActivity;
    import android.view.Menu;
    import android.widget.SimpleAdapter;

    public class MainActivity extends ListActivity {


    String[] from
    ={"name","id"}; //這里是ListView顯示內(nèi)容每一列的列名
    int[] to={R.id.user_name,R.id.user_id}; //這里是ListView顯示每一列對應的list_item中控件的id

    String[] userName
    ={"zhangsan","lisi","wangwu","zhaoliu"}; //這里第一列所要顯示的人名
    String[] userId={"1001","1002","1003","1004"}; //這里是人名對應的ID

    ArrayList
    <HashMap<String,String>> list=null;
    HashMap
    <String,String> map=null;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    //為MainActivity設置主布局
    //創(chuàng)建ArrayList對象;
    list=new ArrayList<HashMap<String,String>>();
    //將數(shù)據(jù)存放進ArrayList對象中,數(shù)據(jù)安排的結(jié)構(gòu)是,ListView的一行數(shù)據(jù)對應一個HashMap對象,
    //HashMap對象,以列名作為鍵,以該列的值作為Value,將各列信息添加進map中,然后再把每一列對應
    //的map對象添加到ArrayList中

    for(int i=0; i<4; i++){
    map
    =new HashMap<String,String>(); //為避免產(chǎn)生空指針異常,有幾列就創(chuàng)建幾個map對象
    map.put("id", userId[i]);
    map.put(
    "name", userName[i]);
    list.add(map);
    }


    //創(chuàng)建一個SimpleAdapter對象
    SimpleAdapter adapter=new SimpleAdapter(this,list,R.layout.list_item,from,to);
    //調(diào)用ListActivity的setListAdapter方法,為ListView設置適配器
    setListAdapter(adapter);
    }

    }


    另外對點擊某一行作出響應的方法是覆寫onListItemClick方法,根據(jù)返回的position(從0開始):
    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
    // TODO Auto-generated method stub
    super.onListItemClick(l, v, position, id);
    }


    posted @ 2016-12-01 13:08 風人園 閱讀(152) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 一区二区三区视频免费观看| 在线观看永久免费| 亚洲国产国产综合一区首页| 18禁免费无码无遮挡不卡网站 | 亚洲欧美国产国产一区二区三区| 免费a级毛片18以上观看精品| 久久青青草原国产精品免费| 在线观看亚洲AV每日更新无码| 亚洲综合精品网站在线观看| 中文字幕无码播放免费| 日本永久免费a∨在线视频| 亚洲精品在线视频观看| 亚洲国产精品成人AV无码久久综合影院| 久久国产精品萌白酱免费| 亚洲国产成人久久精品软件| 亚洲AV无码一区二区乱子伦| 国产一级一片免费播放i| 最近高清中文字幕免费| www成人免费视频| 亚洲最大中文字幕无码网站| 亚洲国产精品无码专区| 免费a级毛片在线观看| 18禁免费无码无遮挡不卡网站 | 国产一级淫片免费播放| 日本视频一区在线观看免费| 国产福利在线观看永久免费| 亚洲综合无码无在线观看| 久久亚洲精品中文字幕无码 | 亚洲图片中文字幕| 久久亚洲精品视频| 亚洲精品国产成人影院| 毛片a级毛片免费观看免下载| 伊人久久免费视频| baoyu777永久免费视频| 一级毛片正片免费视频手机看| 亚洲色大成网站www| 亚洲国产亚洲综合在线尤物| 久久久综合亚洲色一区二区三区 | 国产成人亚洲综合无码| 四虎永久在线精品免费影视| 妞干网免费视频在线观看|