Dkngit 发布的文章

Java TypeJava DB, Derby, CloudScapeOracleDB2SybaseMS-SQL ServerMySQL Server
boolean, java.lang.BooleanSMALLINTNUMBER(1)SMALLINTBITBITTINYINT(1)
int, java.lang.IntegerINTEGERNUMBER(10)INTEGERINTEGERINTEGERINTEGER
long, java.lang.LongBIGINTNUMBER(19)INTEGERNUMERIC(19)NUMERIC(19)BIGINT
float, java.lang.FloatFLOATNUMBER(19,4)FLOATFLOAT(16)FLOAT(16)FLOAT
double, java.lang.DoubleFLOATNUMBER(19,4)FLOATFLOAT(32)FLOAT(32)DOUBLE
short, java.lang.ShortSMALLINTNUMBER(5)SMALLINTSMALLINTSMALLINTSMALLINT
byte, java.lang.ByteSMALLINTNUMBER(3)SMALLINTSMALLINTSMALLINTSMALLINT
java.lang.NumberDECIMALNUMBER(38)DECIMAL(15)NUMERIC(38)NUMERIC(28)DECIMAL(38)
java.math.BigIntegerBIGINTNUMBER(38)BIGINTNUMERIC(38)NUMERIC(28)BIGINT
java.math.BigDecimalDECIMALNUMBER(38)DECIMAL(15)NUMERIC(38)NUMERIC(28)DECIMAL(38)
java.lang.StringVARCHAR(255)VARCHAR(255)VARCHAR(255)VARCHAR(255)VARCHAR(255)VARCHAR(255)
char, java.lang.CharacterCHAR(1)CHAR(1)CHAR(1)CHAR(1)CHAR(1)CHAR(1)
byte[], java.lang.Byte[], java.sql.BlobBLOB(64000)LONG RAWBLOB(64000)IMAGEIMAGEBLOB(64000)
char[], java.lang.Character[], java.sql.ClobCLOB(64000)LONGCLOB(64000)TEXTTEXTTEXT(64000)
java.sql.DateDATEDATEDATEDATETIMEDATETIMEDATE
java.sql.TimeTIMEDATETIMEDATETIMEDATETIMETIME
java.sql.TimestampTIMESTAMPDATETIMESTAMPDATETIMEDATETIMEDATETIME
Supported Data Types (Sun Java System Application Server Platform Edition 9 Developer's Guide)

background

I made an embed page with Spring-boot. The one to show from other sites with iframe. At this time, Spring Security was introduced and the HTTP header "X-Frame-Options" was set to DENY by default, and the embedded page was not displayed.

Since this X-Frame-Options itself should be DENY in order to suppress clickjacking on ordinary pages, I decided that it is better to set not to send this header only on the embedding page. However, "setting X-Frame-Options only for a specific URL" was a little complicated, so I summarized it.

I think that other HTTP Headers can be set for each URL if necessary (unverified).

- 阅读剩余部分 -

作者:朱勋\
链接:https://www.zhihu.com/question/30629377/answer/233402557\
来源:知乎\
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

《前传》

公元前6年农历十二月初六,这是年末普通的一天,前几日刚下了场不大不小的雪,天气正是阴冷,如同目前的朝局一般。

对于兖州陈留郡的济阳县令刘钦来说,天高皇帝远,朝堂上的纷争似乎影响不到自己,他目前最关心的事情,是妻子即将分娩。正值壮年的刘钦已经有了两个儿子,刘縯、刘仲,还有两个女儿,刘黄、刘元。

县令虽然不大,毕竟也是朝廷命宫,刘钦的家境还算不错,几个孩子衣食无忧。刘縯身体强壮,活泼好动,好像是个能撑家业的人;刘仲老实巴交,沉默寡言,几乎没有什么存在感。

多子多福,养得起就生呗,不过产妇最怕受寒,有规格限制的县衙条件简陋,恐怕并不合适。

刘钦一拍大腿,对呀,咱济阳有个行宫!这个行宫还是喜欢巡游的汉武帝下令修建的,如今早已闲置,"借用"一下未尝不可,没准还能沾沾祖宗的光呢!

是的,刘钦姓刘,是汉室宗亲。

- 阅读剩余部分 -

SELinux (Security Enhanced Linux ) is a Linux kernel security module that allows administrators and users more control over access controls. It allows access based on SELinux policy rules.

SELinux policy rules specify how processes and users interact with each other as well as how processes and users interact with files.

When no SELinux policy rule explicitly allows access, such as for a process opening a file, access is denied.

SELinux has three modes:

  • Enforcing: SELinux allows access based on SELinux policy rules.
  • Permissive: SELinux only logs actions that would have been denied if running in enforcing mode.
  • Disabled: No SELinux policy is loaded.

By default, in CentOS 7, SELinux is enabled and in enforcing mode.

It is recommended to keep SELinux in enforcing mode, but in some cases, you may need to set it to a permissive mode or disable it completely.

In this tutorial, we will show you how to disable SELinux on CentOS 7 systems.

- 阅读剩余部分 -