原创 idea與eclipse自動補全類型快捷鍵

1.idea Ctrl+alt+v 2.eclipse alt+shift+l

原创 分頁查詢插件pagehelper用法

1.依賴 <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot

原创 There is no getter for property named 'xxx' in 'class com.mjs.mojisishop.entity.xxx

出現這種報錯說明實體類中沒有該屬性 出現的原因:一般在數據庫中新加字段之後或更改字段類型 解決方法:1.去實體類檢查是否有該屬性,2.去mybatis文件中檢查是否有該字段 特別注意大小寫,尤其是你的mybatis文件是自動生成的,後

原创 mybatis 查詢條件爲小於等於0,查詢到了所有數據

<if test="store != null and goodsstatus != '' "> and store <![CDATA[ <= ]]> #{store} </if>

原创 多條件查詢

<select id="selectByPrimaryKeySelective" parameterType="com.mjs.mojisishop.entity.OrderInfo" resultMap="o

原创 插入記錄後返回該記錄的主鍵id

<insert id="insert" parameterType="com.mjs.mojisishop.entity.ItemCat" useGeneratedKeys="true" keyProperty="id">

原创 Ambiguous mapping. Cannot map 'XXXXXController' method

1.controller層方法重名

原创 eclipse設置智能提示

1.windows→perferences→java→editor→content assist 輸入A→Z

原创 eclipse設置快捷鍵

1.perferences-java-editor-templates

原创 git修改username

1.在包含有.git的目錄中,右鍵,git bash hear 2.git config --global user.name ‘你的名字’ 3.git config --global user.email ‘你的郵箱地址’

原创 HttpClient httpClient = new HttpClient();報錯

jar包錯了 <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifac

原创 idea創建springboot項目

1.打開IDEA,創建新項目,選擇Spring Initializr 2.勾選web 3.更改maven爲本地maven 4.測試項目是否搭建成功 4.1檢查端口 4.2添加controller 4.3啓動項目 4.4在瀏覽

原创 maven的配置

1.settings文件的引用 2.設置本地倉庫 3.設置aliyun鏡像倉庫(或者企業自己的私服) nexus-tedu Nexus tedu central http://maven.aliyun.com/nexus/con