小编Isr*_*elm的帖子

CHMOD 755与750权限设置之间的差异

我有755的一些文件,我需要将它们更改为750,但我不确定这是否会影响某些过程.

我是changin JAR,XML,LOG和适当的文件.

有人可以向我解释这两个权限集之间的区别吗?

谢谢!

xml linux permissions jar chmod

32
推荐指数
1
解决办法
11万
查看次数

java.lang.NoClassDefFoundError:graphql/execution/instrumentation/SimpleInstrumentation(GraphQL 和 Spring Boot)

我正在尝试 GraphQL 和 Spring Boot,当我尝试运行我的 GraphQL 查询之一时,我收到下一个错误:(Graphiql 加载正常)

java.lang.NoClassDefFoundError: graphql/execution/instrumentation/SimpleInstrumentation

POM 依赖项:

<dependency>
        <groupId>com.graphql-java</groupId>
        <artifactId>graphql-spring-boot-starter</artifactId>
        <version>5.0.2</version>
    </dependency>
    <dependency>
        <groupId>com.graphql-java</groupId>
        <artifactId>graphql-java-tools</artifactId>
        <version>4.3.0</version>
    </dependency>
    <dependency>
        <groupId>com.graphql-java</groupId>
        <artifactId>graphiql-spring-boot-starter</artifactId>
        <version>4.0.0</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

这是例外:

java.lang.NoClassDefFoundError: graphql/execution/instrumentation/SimpleInstrumentation
at graphql.servlet.GraphQLQueryInvoker$Builder.lambda$new$0(GraphQLQueryInvoker.java:101) ~[graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.GraphQLQueryInvoker.getInstrumentation(GraphQLQueryInvoker.java:72) ~[graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.GraphQLQueryInvoker.newGraphQL(GraphQLQueryInvoker.java:57) ~[graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.GraphQLQueryInvoker.query(GraphQLQueryInvoker.java:92) ~[graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.GraphQLQueryInvoker.query(GraphQLQueryInvoker.java:88) ~[graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.GraphQLQueryInvoker.query(GraphQLQueryInvoker.java:39) ~[graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.AbstractGraphQLHttpServlet.query(AbstractGraphQLHttpServlet.java:265) [graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.AbstractGraphQLHttpServlet.lambda$new$2(AbstractGraphQLHttpServlet.java:183) [graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.AbstractGraphQLHttpServlet.doRequest(AbstractGraphQLHttpServlet.java:236) [graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.AbstractGraphQLHttpServlet.doRequestAsync(AbstractGraphQLHttpServlet.java:227) [graphql-java-servlet-6.1.2.jar:na]
at graphql.servlet.AbstractGraphQLHttpServlet.doPost(AbstractGraphQLHttpServlet.java:257) [graphql-java-servlet-6.1.2.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) [tomcat-embed-core-9.0.26.jar:9.0.26]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat-embed-core-9.0.26.jar:9.0.26]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-9.0.26.jar:9.0.26]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.26.jar:9.0.26]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.26.jar:9.0.26]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) …
Run Code Online (Sandbox Code Playgroud)

java spring-boot graphql

4
推荐指数
1
解决办法
7167
查看次数

Spring Boot 的 Spring Security 默认凭据是什么?

Spring Boot我正在使用,spring-data-rest-hal-browser一切似乎都很好,除了当我尝试点击 URL 时:http://localhost:8080我被重定向到http://localhost:8080/login使用 HAL 浏览器来导航我的端点,然后我看到一个屏幕,要求输入用户和密码我没有。

登录 Spring Security 的默认凭据是什么?如何更改它们或禁用登录选项?

这是我正在使用的依赖项:

<dependency>
 <groupId>org.springframework.data</groupId>
 <artifactId>spring-data-rest-hal-browser</artifactId>
</dependency>

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-security</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)

这是登录屏幕:

在此输入图像描述

java spring hateoas spring-boot

2
推荐指数
1
解决办法
6521
查看次数

如何将WAR文件添加到现有的EAR文件中?

有人可以向我解释如何将WAR文件添加到EAR中吗?我有一个EAR文件已经包含一个WAR文件,我有另一个WAR文件,我想添加到这个EAR,所以它可以包含两个WAR并正常工作.

我不知道怎么做但我认为可以手动更改包含在EAR中的application.xml文件.

谢谢!

java deployment ear war java-ee

1
推荐指数
1
解决办法
8911
查看次数

JDBC java.sql.Date()比较是假的

我很好奇为什么if比较是假的:

我使用以下代码在日期字段中插入日期:

preparedStatement.setDate(1, new java.sql.Date(new java.util.Date().getTime()));
System.out.println("sql date" + new java.sql.Date(new java.util.Date().getTime()));
output is: 2014-07-16
Run Code Online (Sandbox Code Playgroud)

插入后,我查询数据库以查明今天是否插入了记录:

    String sql = select MAX (last_modified) as last_modified from mydb.mytable
    ResultSet rs = stmt.executeQuery(sql);

    while (rs.next())
    {

        if (rs.getDate(1).equals(new java.sql.Date(new java.util.Date().getTime())))
        {
            System.out.println("Same Date in here not need to update");
         }
        else
        {
            System.out.println("Dates are different");
        }

        System.out.println("date from db: " + rs.getDate(1));  
        System.out.println("new sql date: " + new java.sql.Date(new java.util.Date().getTime()));: 
    }
Run Code Online (Sandbox Code Playgroud)

输出是:

Dates are different
date from db: 2014-07-16
new sql date: 2014-07-16 …
Run Code Online (Sandbox Code Playgroud)

java sql sql-server date jdbc

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

java ×4

spring-boot ×2

chmod ×1

date ×1

deployment ×1

ear ×1

graphql ×1

hateoas ×1

jar ×1

java-ee ×1

jdbc ×1

linux ×1

permissions ×1

spring ×1

sql ×1

sql-server ×1

war ×1

xml ×1