2023年3月27日 星期一
nginx 代理nacos cluster 2.X , 無法註冊服務
2023年3月8日 星期三
參考IT名人的BLOG
2022年8月29日 星期一
SSH Client 無法連線至SSH Server 設定
/etc/ssh 是Client 的設定資料夾
/etc/sshd 是Server 的設定資料夾
KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Host *
HostKeyAlgorithms=+ssh-dss
2022年2月25日 星期五
2021年11月27日 星期六
java static get Class Name
for log4j static object initialize class name.
static String CLASS_NAME = java.lang.invoke.MethodHandles.lookup().lookupClass().getName(); static Logger log = Logger.getLogger(CLASS_NAME);
2021年10月6日 星期三
Add Maven dependencies to Eclipse Deployment Assembly
在Eclipes Project 中,加入<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
手動使用這個方法在執行Maven-update project 之後,該項設定會消失。可以透過Eclipse 的設定來處理:
在Java Build Path->Order and Export 勾選 Maven Dependencies
如此再執行Maven Update Project,Deployment Assembly關於Maven Dependency設定還是會不見。但另外新增一個專案,將.classpath、.project copy 至此專案,則看似正常,所以還在確認解決方法。
2021年7月29日 星期四
Maven install a jar to private repository
pom 需要有一個效果就是引用本機的JAR檔.
可以這麼作
<dependency>
<groupId>com.sample</groupId>
<artifactId>sample</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/Name_Your_JAR.jar</systemPath>
</dependency>
也可以這麼作
mvn install:install-file
-Dfile=D:/tmp/myTest.jar
-DgroupId=com.test
-DartifactId=myTest
-Dversion=1.0
-Dpackaging=jar
<dependency>
<groupId>com.test</groupId>
<artifactId>myTest</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
2021年7月28日 星期三
2021年5月26日 星期三
技巧的設定JAVA main 測試環境
2021年4月5日 星期一
2020年12月24日 星期四
2020年12月17日 星期四
時間是最珍貴的資源
時間是最珍貴的資源,不能管理時間,便什麼也無法管理。
Time is the scarcest resource and unless it is managed nothing else can be managed.
—— 彼得.杜拉克 - 管理學之父
2020年12月10日 星期四
Java system properties and environment variables
- System properties are set on the Java command line using the -Dpropertyname=value syntax. They can also be added at runtime using System.setProperty(String key, String value) or via the various System.getProperties().load() methods.
To get a specific system property you can use System.getProperty(String key) or System.getProperty(String key, String def).
- Environment variables are set in the OS, e.g. in Linux export HOME=/Users/myusername or on Windows SET WINDIR=C:\Windows etc, and, unlike properties, may not be set at runtime.
To get a specific environment variable you can use System.getenv(String name).
2020年12月3日 星期四
2020年11月8日 星期日
2020年11月2日 星期一
MySQL relay-bin log error
MySQL Replication Server , 因空間滿了, 導致MySQL 無法登入.
這應該持續一段時間了, 檢查之後發現是 relay-bin log 滿了。
應該是年中時, 有大量的刪除及UPDATE 資料關係。
所以Replication 要重建。因為空間滿了無法啟動MYSQL, 所以只能刪掉一些檔案, 重啟slave 時發現下列錯誤.
ERROR 29 (HY000): File './#####-relay-bin.001416' not found (Errcode: 2 - No such file or directory)
處理方法
1. stop slave
2. reset slave
3. rm *.relay-bin*
4. restart mysql
5. CHANGE MASTER TO MASTER_HOST….略
6. start slave
完成收工.
2020年11月1日 星期日
Export SQL Server Agent Jobs
You can do all your Agent jobs in one go fairly easy:
1. Click on the "Jobs" section in the SQL Agent in SSMS
2. Hit the F7 key on your keyboard (opens the Object Explorer Details)
3. Highlight the jobs you want to export in the Object Explorer Details
4. Right-click the highlighted jobs and "Script Job As..." like you would for a single job
2020年10月25日 星期日
Eclipse Library Folder ClasspathContainer
2020年10月21日 星期三
Centos 7+ 停用網卡自動命名
已經很習慣使用ifcfg-eth0 來定義預設網卡,
自Centos 7 之後, 會自動命名網卡名稱, 非常不習慣.
解決這個方法可以在安裝Centos 7或8時, 多輸入下列的命令
net.ifnames=0 biosdevname=0
如此即可。
Ads
