有人可以告诉我如何在 bash 中以毫秒为单位格式化数据吗?感谢帮助。
BR。
彼得
我在卡夫卡日志中有奇怪的错误:
\n2023-12-21 00:22:17,254] DEBUG Setting SASL/SCRAM_SHA_256 server state to FAILED (org.apache.kafka.common.security.scram.internals.ScramSaslServer)\n[2023-12-21 00:22:17,256] DEBUG Set SASL server state to FAILED during authentication (org.apache.kafka.common.security.authenticator.SaslServerAuthenticator)\n[2023-12-21 00:22:17,257] INFO [SocketServer listenerType=ZK_BROKER, nodeId=0] Failed authentication with /127.0.0.1 (channelId=127.0.0.1:9092-127.0.0.1:63474-6) (Authentication failed during authentication due to invalid credentials with SASL mechanism SCRAM-SHA-256) (org.apache.kafka.common.network.Selector)\nRun Code Online (Sandbox Code Playgroud)\n我的服务器属性:
\nsasl.enabled.mechanisms=SCRAM-SHA-256
\nlisteners=SASL_SSL://localhost:9092\nadvertised.listeners=SASL_SSL://localhost:9092\n\nsasl.mechanism.inter.broker.protocol=SCRAM-SHA-256\nsecurity.inter.broker.protocol=SASL_SSL\nssl.keystore.location=C:/apps/certs/keystore.jks\nssl.keystore.password=sepultura1\nssl.key.password=sepultura1\nssl.truststore.location=C:/apps/certs/truststore.jks\nssl.truststore.password=sepultura1\nssl.client.auth=required\nssl.endpoint.identification.algorithm=\nRun Code Online (Sandbox Code Playgroud)\n我的 Kafks 服务器 jaas.conf:
\nKafkaServer {\n org.apache.kafka.common.security.scram.ScramLoginModule required\n username="user"\n password="sepultura1";\n};\nClient {\n org.apache.zookeeper.server.auth.DigestLoginModule required\n user="user"\n password="sepultura1";\n};\nKafkaClient {\norg.apache.kafka.common.security.scram.ScramLoginModule required\nusername="user"\npassword="sepultura1";\n};\nRun Code Online (Sandbox Code Playgroud)\n我的 Zookeper.properties:
\nrequireClientAuthScheme=sasl\n\nzookeeper.authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider\nRun Code Online (Sandbox Code Playgroud)\n我的动物园管理员 jaas.conf:
\n …我有这个 Spring 安全配置:
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd ">
<http pattern="/api/swagger-ui.html" security="none" xmlns="http://www.springframework.org/schema/security"/>
<http pattern="/api/webjars/**" security="none" xmlns="http://www.springframework.org/schema/security"/>
<http pattern="/api/swagger-resources/**" security="none" xmlns="http://www.springframework.org/schema/security"/>
<http pattern="/api/v2/api-docs" security="none" xmlns="http://www.springframework.org/schema/security"/>
<http pattern="/api/**" create-session="never" entry-point-ref="oauthAuthenticationEntryPoint"
access-decision-manager-ref="accessDecisionManager" xmlns="http://www.springframework.org/schema/security">
<anonymous enabled="false"/>
<intercept-url pattern="/api/**" access="IS_AUTHENTICATED_FULLY"/>
<custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER"/>
<access-denied-handler ref="oauthAccessDeniedHandler"/>
</http>
<bean id="accessDecisionManager" class="org.springframework.security.access.vote.UnanimousBased"
xmlns="http://www.springframework.org/schema/beans">
<constructor-arg>
<list>
<bean class="org.springframework.security.oauth2.provider.vote.ScopeVoter"/>
<bean class="org.springframework.security.access.vote.AuthenticatedVoter"/>
</list>
</constructor-arg>
</bean>
<bean id="oauthAuthenticationEntryPoint"
class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint">
<property name="realmName" value="sample"/>
</bean>
<bean id="oauthAccessDeniedHandler"
class="org.springframework.security.oauth2.provider.error.OAuth2AccessDeniedHandler"/>
<oauth:resource-server id="resourceServerFilter" resource-id="sample" token-services-ref="remoteTokenServices"/>
<bean id="remoteTokenServices" …Run Code Online (Sandbox Code Playgroud) 我在互联网上发现问题是soap请求包含unicode char for ,, ctrl + v",这是Xml中的非法字符.我不知道这是如何进入String的,但我想简单地在服务器端删除它.
可以请某人给我点如何解决这个问题?我找到了这个片段:
XMLOutputFactory f = new WstxOutputFactory();
f.setProperty(WstxOutputProperties.P_OUTPUT_INVALID_CHAR_HANDLER,
new InvalidCharHandler.ReplacingHandler(' '));
XMLStreamWriter sw = f.createXMLStreamWriter(...);
Run Code Online (Sandbox Code Playgroud)
有人能告诉我如何使用此处理程序配置Spring以构建WstxOutputFactory吗?- InvalidCharHandler.ReplacingHandler('').谢谢你的建议.
我在将 Bootstrap 表单控件填充设置为 0 时遇到问题。我尝试.form-control在样式中添加类,但没有成功。我相信应该可以覆盖样式块中 CSS 类的一些属性。
如何将.form-control填充设置为 0?
<wicket:head xmlns:wicket="http://wicket.apache.org/">
<styles>
.form-control {
padding: 0px;
}
</styles>
</wicket:head>
<wicket:panel xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/">
<div class="col-xs-12">
<div class="col-xs-12">
<div class="form-group">
<div class="col-sm-3">
<input type="submit" value="Request" class="btn btn-danger"/>
</div>
<div class="col-sm-3">
<label for="quotationId" wicket:id="quotationIdLabel"></label>
<div>
<input wicket:id="quotationId" type="text" size="20"/>
</div>
</div>
<div class="col-sm-3">
<label for="product" wicket:id="productLabel"></label>
<div>
<select class="form-control" wicket:id="product"/>
</div>
</div>
<div class="col-sm-3">
<label for="contract" wicket:id="contractLabel"></label>
<div>
<input type="hidden" wicket:id="contract"/>
</div>
</div>
<div class="col-sm-3" style="padding: 0">
<label for="customer" …Run Code Online (Sandbox Code Playgroud)