我正在使用Oracle SQL开发人员版本3.0.04.我试图使用该功能LISTAGG将数据分组在一起..
CREATE TABLE FINAL_LOG AS
SELECT SESSION_DT, C_IP, CS_USER_AGENT,
listagg(WEB_LINK, ' ')
WITHIN GROUP(ORDER BY C_IP, CS_USER_AGENT) "WEB_LINKS"
FROM webviews
GROUP BY C_IP, CS_USER_AGENT, SESSION_DT
ORDER BY SESSION_DT
Run Code Online (Sandbox Code Playgroud)
但是,我一直收到错误,
SQL Error: ORA-01489: result of string concatenation is too long
Run Code Online (Sandbox Code Playgroud)
我很确定输出可能超过4000,因为这里提到的WEB_LINK是url stem和url查询的连接值.
有没有办法解决它还是有其他选择吗?
class strb
{
static public void main(String...string)
{
StringBuilder s1 = new StringBuilder("Test");
StringBuilder s2 = new StringBuilder("Test");
System.out.println(s1);
System.out.println(s2);
System.out.println(s1==s2);
System.out.println(s1.equals(s2)); //Line 1
System.out.println(s1.toString()==s2.toString()); //Line 2
if(s1.toString()==s2.toString())System.out.println("True"); //Line 3
}
}
Run Code Online (Sandbox Code Playgroud)
输出是
Test
Test
false
false
Run Code Online (Sandbox Code Playgroud)
只需对.equals快速提问.
无论对象内容如何,.equals只有当两个对象引用指向同一个对象时才返回true?
编辑:现在我理解有关的部分,.equals但为什么第2行和第3行也没有返回true?
编辑:我相信==看看引用变量的地址,所以s1和s2不能相等.如果我的假设不对,请更正我
我创建了一个拉取请求,我的审批者请求进行一些更改,我将这些更改标记为已解决并单击re-request按钮,但没有查看合并是否被阻止或解除阻止。那么现在要解除合并阻止,审批者是否需要再次审核更改并批准它?因为下面的消息并没有说需要审稿人批准。
一旦请求的更改得到解决,合并就可以自动执行。
我正在 Kubernetes 集群上部署我的微服务。每个应用程序都有 4 个副本或 PODS。对于 1 个应用程序中的 REST API,我想跟踪哪个 POD 解决了我的请求。例如,我的/app/deploy(body contains app_id)请求由POD1.
同样,我在我的应用程序中导入了 Kubernetes jar。在我的代码中,我想检查运行此代码的当前 POD。我想要一个像这样的 API kubernetesDiscoveryClient.getCurrentPOD()。
大家好,我...
我需要建立一个与车辆登记相关的挥杆应用程序,我想在其中输入印度标准的车辆编号,如:
MP 09 AB 1234
AH 17 FT 2387
UT 32 DR 6423
DL 01 C AA 1111
进一步来说,
如果有人可以帮助我吗?
DocumentFilter类型类也可以帮助我.........
我目前正在开发一个 Flutter 应用程序,它需要用户在使用前注册。我使用 Firebase 身份验证并想检查电子邮件是否已在应用中注册。
我知道最简单的方法是在使用该createUserWithEmailAndPassword()方法时捕获异常(如本问题中的回答)。问题是我在与用户注册的路径不同的路径中请求电子邮件地址,因此等待调用此方法对我来说不是一个好选择。
我认为最好的选择是使用 method fetchProvidersForEmail(),但我似乎无法让它工作。
我如何使用该方法?或者是否有更好的选择来了解电子邮件是否已注册?
我正在致力于使用“放心”来自动化 API 测试。我有一个 API,如果我们使用 http 调用该 API,那么服务器将返回响应代码 302 和位置相同的 URL,但使用 https 。我写了下面的代码:
RequestSpecification httprequest= RestAssured.given().relaxedHTTPSValidation();
Response response= httprequest.request(Method.GET, uri);
Run Code Online (Sandbox Code Playgroud)
执行上述操作时,系统抛出错误javax.net.ssl.SSLHandshakeException
我进行了很多搜索,但没有找到合适的解决方案。
我想测试一个@Service通常用SpringApplication.run().
服务类是:
@Service
@EnableConfigurationProperties(AppProperties.class)
public class MongoService {
private static final Logger logger = LoggerFactory.getLogger(MongoService.class);
private MongoClient mongoClient;
private final AppProperties properties;
@Autowired
public MongoService(AppProperties properties) {
this.properties = properties;
}
/**
* Open connection
*/
public void openConnection() {
try {
mongoClient = new MongoClient(new MongoClientURI(properties.getMongoConnectionString()));
} catch (Exception e) {
logger.error("Cannot create connection to Search&Browse database", e);
throw new BackendException("Cannot create connection to Search&Browse database");
}
}
}
Run Code Online (Sandbox Code Playgroud)
当它通过启动与控制器叫SpringApplication.run()时,MongoService不为空,但是,当我从它不工作JUnit的尝试。
所以,我正在尝试这个: …
我有MySQL表格中的数据
我想获取员工记录,如下所示
样本数据:
CREATE TABLE `login_details` (
`idlogin_details` int(11) NOT NULL AUTO_INCREMENT,
`emp_id` varchar(45) DEFAULT NULL,
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`idlogin_details`)
)
INSERT INTO `login_details` VALUES (1,'3','2018-07-11 05:18:59'),(2,'2','2018-07-11 05:18:59'),(3,'4','2018-07-11 05:18:59'),(4,'1','2018-07-11 05:18:59'),(5,'1','2018-07-13 05:18:59'),(6,'2','2018-07-13 05:18:59'),(7,'3','2018-07-12 05:18:59'),(8,'3','2018-07-13 05:18:59'),(9,'4','2018-07-13 05:18:59'),(10,'5','2018-07-13 05:18:59');
Run Code Online (Sandbox Code Playgroud) 我想编写一个测试来@NotNull验证.@NotEmpty@ConfigurationProperties
@Configuration
@ConfigurationProperties(prefix = "myPrefix", ignoreUnknownFields = true)
@Getter
@Setter
@Validated
public class MyServerConfiguration {
@NotNull
@NotEmpty
private String baseUrl;
}
Run Code Online (Sandbox Code Playgroud)
我的测试如下所示:
@RunWith(SpringRunner.class)
@SpringBootTest()
public class NoActiveProfileTest {
@Test(expected = org.springframework.boot.context.properties.bind.validation.BindValidationException.class)
public void should_ThrowException_IfMandatoryPropertyIsMissing() throws Exception {
}
Run Code Online (Sandbox Code Playgroud)
}
当我运行测试时,它报告在测试运行之前启动应用程序失败:
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'myPrefix' to com.xxxxx.configuration.MyServerConfiguration$$EnhancerBySpringCGLIB$$4b91954c failed:
Run Code Online (Sandbox Code Playgroud)
我如何期望异常会编写负面测试?即使我将其替换BindException.class为Throwable.class应用程序也无法启动。
java ×5
spring-boot ×3
sql ×2
firebase ×1
flutter ×1
git ×1
git-branch ×1
github ×1
kubernetes ×1
mysql ×1
oracle ×1
regex ×1
rest ×1
rest-assured ×1
spring ×1
spring-mvc ×1
spring-test ×1
validation ×1