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

  • Home
  • SEARCH
  • 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 3846970
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:28:46+00:00 2026-05-19T16:28:46+00:00

Hibernate Search, Hibernate, Struts2… I see more examples… In same examples I see the

  • 0

Hibernate Search, Hibernate, Struts2… I see more examples… In same examples I see the annotation on the field.. Other on the get/set method.. There are differences? Or is casual..

I hope that is not a stupid question!

Saluti!

Luigi

  • 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-05-19T16:28:47+00:00Added an answer on May 19, 2026 at 4:28 pm

    The difference depends on the annotation and how it is used. For example, in Spring you can use the @Controller annotation only on a class. This tells Spring that the class is a controller.

    As far as methods are concerned, @RequestMapping is an annotation that goes on a method. For properties, you can have validation annotations like @NotNull (in Hibernate validator).

    Annotations are definitely not casual; they carry meaning and can affect the way the code behaves.

    From the Java documentation regarding annotations:

    Annotations provide data about a
    program that is not part of the
    program itself. They have no direct
    effect on the operation of the code
    they annotate.

    Annotations have a number of uses,
    among them:

    • Information for the compiler — Annotations can be used by the
      compiler to detect errors or suppress
      warnings.

    • Compiler-time and deployment-time processing — Software tools can
      process annotation information to
      generate code, XML files, and so
      forth.

    • Runtime processing — Some annotations are available to be
      examined at runtime.

    Annotations can be applied to a
    program’s declarations of classes,
    fields, methods, and other program
    elements.

    You can specify what an annotation can annotate by specifying the the elements (using a @Target annotation) when you define your own annotation.

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

Sidebar

Related Questions

What is the FieldBridge for timestamp in HIbernate Search? @Field public java.sql.Timestamp approvedDate;
Using Hibernate Search Annotations (mostly just @Field(index = Index.TOKENIZED) ) I've indexed a number
Does hibernate HQL queries support using select min, max, count and other sql functions?
I implemented Hibernate Search in my application i.e. based on Lucene. Whenever, i indexes
I just started integrating Hibernate Search with my Hibernate application. The data is indexed
I am using Hibernate Search and applied Lucene indexing on one table for a
I am using Hibernate search. I have a search text box in my jsp
In our Spring application we use clustered Hibernate Search with ActiveMQ which sets up
Is it possible to use hibernate search/lucene to index some entity based on values
I am trying to run Hibernate Search on database on a table with 12,500,000

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.