Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8686929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:59:21+00:00 2026-06-12T22:59:21+00:00

I’ve been recently trying out spring-test-mvc since using the handlerAdapter and handlerMapping objects in

  • 0

I’ve been recently trying out spring-test-mvc since using the handlerAdapter and handlerMapping objects in the application context no longer support session attributes when you pass objects in that way like they used to in Spring 3.0.

Is there any way to ease the coding of these tests from IntelliJ IDEA? Having to import so many static methods is rather time-consuming, and to be honest, I preferred my older method of testing a lot more (but I can no longer do it that way in 3.1). Is there any way to tell IntelliJ IDEA: “If I type get(), automatically import that method statically” ?

Are there any other alternatives to spring-test-mvc that are easier to code against but also test request mappings in addition to controller logic? I also need to support session attributes.

In addition to the weird syntax of writing tests in spring-test-mvc, it seems really odd to pass in session attributes into the controller. They seem to encourage creating an object constructor where you pass the session objects in that way… but I don’t want to make this constructor on my controllers when it is not used during production. That’s gotta be a testing anti-pattern, but I don’t see any other way to pass in a session object as part of the request and their examples encourage making this object constructor.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:59:22+00:00Added an answer on June 12, 2026 at 10:59 pm

    In IntelliJ’s preferences, under Project Settings > Code Style > Java and under the Import tab, you can enter certain packages you always want to import with *. If you enter the package names of the spring-test-mvc classes you are frequently importing, then IntelliJ should suggest (and add the import for) the methods for you automatically as you start typing.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.