原创 分享 上下五千年.chm。是 chm 格式的電子書,不是 pdf

分享 上下五千年.chm。是 chm 格式的電子書,不是 pdf 下載鏈接:    https://pan.baidu.com/s/1VK2mNnnVO4OPXgLKzXI8kg      提取碼:       r4ki

原创 @Bean 註解的作用

被 @Bean 註解標註的方法會創建一個 bean 的實例,放在 spring IoC 容器中。等需要使用這個 bean 的時候,在類裏用 @Autowired,@Resource 注入這個對象就行了。 例如: @Bean public

原创 Windows7 修改 hosts 文件。開發 spring cloud 項目時,一開始需要修改這個文件

Windows7 的 hosts 文件的位置是 C:\Windows\System32\drivers\etc 開發 spring cloud 項目時,一開始需要修改這個 hosts 文件  

原创 java / js 裏的 st1.indexOf( str ) > -1,在 python 裏得用 st1.find( str ) > -1 來實現

java / js 裏的 st1.indexOf( str ) > -1,在 python 裏得用 st1.find( str ) > -1 來實現 name = 'text1' str = ' xt' # python indexO

原创 python 獲得 今天,昨天,明天 的某個時刻

import datetime # python 獲得 今天,昨天,明天 的某個時刻 now = datetime.datetime.now() date5 = now.strftime( '%Y-%m-%d' ) date5 += "

原创 搭建 ssh 或 ssm 項目,spring 核心配置文件中的主要配置選項

(1) spring的核心配置文件中的配置 spring 的核心配置文件的名字叫做 applicationContext.xml, 後期也可以通過配置文件中的配置修改名稱,在 WEB-INF/web.xml 中進行如下配置: <conte

原创 SpringBoot jpa 自動建表的配置方法

在 application.properties 文件中這樣配置: spring.jpa.hibernate.ddl-auto=update update 的含義:每次運行這個服務,數據庫裏如果沒有表,會新建表。表內有數據不會清空。服務會

原创 Spring Cloud 中 .yml 與 .properties 配置文件的區別

springboot 可以使用 application.properties 文件進行配置,內容是這樣的: server.port=8801 eureka.client.registerWithEureka=false eureka.cl

原创 發現一個 yml 和 properties 互相轉換的在線工具

發現一個 yml 和 properties 互相轉換的在線工具 網址: https://www.mawho.com/yml2prop.html

原创 @PostConstruct 註解的作用

@PostConstruct 註解的用途:  在當前對象加載完依賴注入的 bean 後,運行這個被註解的方法,而且只運行一次。

原创 spring 中 @Component 的含義

@Component 用於將所標註的類加載到 Spring 環境中,需要搭配 component-scan 使用

原创 html 嵌入 flash 的方法

例子: <object > <param name="allowScriptAccess" value="sameDomain" /> <param name="quality" value="high" /> <param name=

原创 jquery 實現的 數字華容道

<!DOCTYPE html> <html> <head> <meta charset="gbk"> <title>數字華容道</title> <style type="text/css"> *{ padding: 0px;

原创 java 實現 哈希查找 的例子

/* 哈希結點 */ class TheNode { int key; // 鏈表中的鍵 TheNode next; // 下一個節點 // public String toString() { return "

原创 tomcat7 部署項目時報錯:Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web

tomcat7 部署項目時報錯:Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web,無法將項目添加到 tomcat 中。 解決方法:找到