先前我在開發軟體時,我設定讓他以 localhost:6000 開啟,結果出現 ERR_UNSAFE_PORT 錯誤,然而用 cURL 卻又一切正常。
經查詢,這是因為 6000 在瀏覽器中被列為 unsafe port。
這個 port 是 linux X11 桌面系統所用的,所以瀏覽器將之限制了。
先前我在開發軟體時,我設定讓他以 localhost:6000 開啟,結果出現 ERR_UNSAFE_PORT 錯誤,然而用 cURL 卻又一切正常。
經查詢,這是因為 6000 在瀏覽器中被列為 unsafe port。
這個 port 是 linux X11 桌面系統所用的,所以瀏覽器將之限制了。
這篇算是延續先前《SpringBoot 使用多個資料庫連線》的狀況
我今天想要使用Hibernate envers來處理資料的版控。
原先我是這樣處理的:
pom.xml 加上library
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
</dependency>application.properties 加上設定
spring.jpa.properties.hibernate.envers.audit_table_suffix=_rev
spring.jpa.properties.hibernate.envers.revision_field_name=rev
spring.jpa.properties.hibernate.envers.revision_type_field_name=revtype
@Audit
import javax.persistence.Entity;
import javax.persistence.Table;
import org.hibernate.envers.Audited;
@Entity
@Audit
@Table(name = "my_entity")
class MyEntity{
// 中略
}然而,實際執行時,Hibernate 處理版控資料時,都想要存入
my_entity_AUD,即
insert into `my_entity_AUD`
# 下略
不知為何還蠻難找到 MS 365 的 SMTP 設定,在此紀錄
| host | outlook-apaccentral.office365.com |
|---|---|
| port | 587 |
| protocol | smtp |
| username | 你的 Outlook mail,例如 john.smith@live.com |
| password | Outlook 密碼 |
| from | 同 username |
另外,我是使用 Java + spring, spring 有兩個參數不確定是在其他程式語言對應的數值,所以在這邊先列一下:
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.auth=true
以下是一個簡單的 package.json
{
"name": "Lorem ipsum dolor sit amet",
"version": "1.0.0",
"description": "Ac odio tempor orci dapibus.",
"main": "index.js",
"scripts": {
"start": "webpack",
"dev": "webpack-dev-server --open"
},
"engines": {
"node": "v8.6.0"
}
}
如果我的 Node.js 是最新版,那就無法執行該專案了。
因為某些緣故,需要有個 wordpress 環境,為了方便,所以想說本來電腦就有 tomcat 就看看能不能用 tomcat 直接執行 php。
結果上網查了查,還真的有辦法,在此紀錄一下:
SSH Tunnel 連線的介紹,我覺得關於 SSH Tunnel 連線 (SSH Proxy, SSH Port Forwarding)這篇文章寫得還不錯。這邊就不多提了
使用環境是Windows10 的 WSL 的 Ubuntu 18。
我想在其中安裝 clickhouse client,沒想到依照官網的做法卻無法安裝。