spring-mvc

    0热度

    1回答

    我有完整注释的spring mvc应用程序。哪里是添加@componentScan的最佳地点?让我知道这些建议中的任何一个 扩展AbstractAnnotationConfigDispatcherServletInitializer的类? 类延伸WebMvcConfigurationSupport 类延伸WebSecurityConfigurerAdapter 我放置在2没有安全和workign细

    0热度

    2回答

    我有一个用户界面表单wid 2 textboxes我需要我的Json文件在点击提交按钮后附加2个文本框中的值。我在这里使用Spring MVC架构。只是想知道我该如何处理这个需求。

    2热度

    1回答

    我正在尝试使用create-react-app和Spring Boot创建一个简单的Web应用程序,但是Spring在资源中找不到index.html。 阵营的build文件夹是由maven-resources-plugin复制到target: 这是我的项目结构: 控制器: @Controller public class BasicController { @RequestMappi

    0热度

    3回答

    我试着用用MyBatis的映射器Spring的事务管理器像在服务 @Service("myService") class MyServiceImpl implements MyService { @Autowired private MyMapper myMapper; @Transactional( value = "transactionMana

    0热度

    1回答

    我做了一个过滤器,以所有请求 @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletR

    0热度

    2回答

    我有一个在BasicAuthenticationFilter之前调用的自定义筛选器,Bean在SecurityConfig文件中是自动装配的。 .addFilterBefore(preAuthTenantContextInitializerFilter, BasicAuthenticationFilter.class) 这是过滤器的样子。 @Component public class Pr

    0热度

    1回答

    我想使用弹簧控制器将简单列表值打印到选择框。它成功返回所有值使用 ${test} 但是,虽然我想这不起作用。解决方案将欣赏。 控制器 @RequestMapping(value="/flight", method = RequestMethod.GET) public ModelAndView homePage(CountryCodes country) { //model.add

    0热度

    1回答

    我在这里看到很多关于会话属性删除的问题,这很好,但它不是我想要的。也许我误解了这一点。 问题: 我通过一个会话发送两个ajax请求。 当我发送第一个Ajax请求“RequestA”时,我的属性“AtributeA”将被删除。我看到,在hattpSession中它不再被列出。 当我发送第二个Ajax请求“RequestB”给其他一些处理程序时,我仍然看到我的属性“AtributeA”。即使这个对象的

    2热度

    2回答

    我有两个接口名称相同但包装不同。 因为我autowired他们我必须给他们的名字。我的界面是com.example.mysql.UserRepository和com.example.mongo.UserRepository。 所以我已经宣布他们是这样的: @Repository(value = "mysqlrepo") public interface UserRepository extend

    0热度

    1回答

    通过角我发送更新请求到控制器春天,我有方法来映射这个请求,但在此@RequestBody无法映射到我的课,给 错误: **2017-10-06 12:42:43.496 ERROR 5856 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherS