spring-boot

    0热度

    1回答

    我已经发布了使用spring启动的spring web服务。在WsConfigurerAdapter中,我使用了带有SimplePasswordValidationCallback的XwsSecurityInterceptor来验证用户,这很好。 web配置, @Bean XwsSecurityInterceptor securityInterceptor() { XwsSecurit

    5热度

    1回答

    我想知道,我如何能从Thymeleaf获得用户对象。目前我正在调用我的userService,它将从DB获取用户。我不喜欢这种方法,因为每次调用db查询都会进行。 是否有可能从内存中获取用户? <link href="/css/style2.css" th:if="${@commanderService.getCurrentCommander()} and ${@comman

    2热度

    2回答

    我已经花了好几个小时在此发布之前... 我有一个弹簧启动应用程序运行良好作为JAR,但是当我尝试将其转换为WAR我不能部署它。 我试图寻找它的规则来决定它是Tomcat嵌入还是外部。 通过WEB-INF/lib和WEB-INF/lib提供的WAR看起来没有问题,并且没有明显放错位置的罐子。 我的应用程序类扩展了SpringBootServletInitializer。调试时,该类将应用程序上下文类

    0热度

    1回答

    我们提供以下信息 info: build: artifact: ${project.artifactId} name: ${project.name} description: ${project.description} version: ${project.version} 当我们访问通过MVN弹簧开机/信息终点有applicati

    0热度

    2回答

    我想为spring-boot REST项目添加安全性。我使用控制器和数据库的自定义身份验证,而不是基本的,而不是OAuth。 是否有任何关于如何将安全性添加到spring-boot REST项目的好教程? 我使用的安全配置: package com.example.control.api; import com.example.control.api.shared.service.Databa

    4热度

    3回答

    我已经使用Spring Boot已经有几个星期了,而且我已经习惯使用application.properties文件。我可以将它用于简单部署,并可与java jar或mvn spring-boot:run一起使用。 现在我试图将我的应用程序部署到Tomcat 8.0.15应用程序服务器。我一直在阅读文档,但我无法部署war文件,因为Tomcat无法找到这个着名的application.proper

    0热度

    1回答

    我目前正在编写一个用户编辑表单。 我有如下结构的用户对象(伪代码): User String name, int age, Address adress, Email email, User child, getter/setter 现在,这个目标我把作为对象的Model如下所示: @RequestMapping(value = "/{login}/edit", method

    0热度

    1回答

    我最近添加一些自定义的方言和处理器到我的春天启动的应用程序,但是当我把它们放在页面那样: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-spring

    1热度

    1回答

    我正在使用Spring Boot 1.1.9.RELEASE with thymeleaf。如果我的代码中存在一些错误,则不会显示Tomcat默认错误页面。我禁用了示例错误页面。请看我的application.yml文件。 error: whitelabel: enabled: false 在1.1.9.RELEASE之前,如果我禁用了白色标签,将显示Tomcat错误页面。

    0热度

    1回答

    我有2个数据源bean,我使用的是spring boot,spring数据,我标记了一个数据源bean与@primary注释,我仍然得到错误:No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined:: expected single matching bean but found 2. 下面 是我