This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Field myShapeOne in com.lici.spring.bean.shape.ShapeService required a single bean, but 2 were found: | |
.... | |
Field myShapeTwo in com.lici.spring.bean.shape.ShapeService required a single bean, but 2 were found: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/user") | |
public class UserController { | |
@RequestMapping(value={"/find", "/search*","/get/*","**/findall"}, method = RequestMethod.GET) | |
public String findAllUsers() { | |
return "GettingUsers"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/user") | |
public class UserController { | |
@RequestMapping(value="/find", method = RequestMethod.GET) | |
public void findAllUsers() { | |
/** | |
* Adding user logic | |
*/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target({ElementType.TYPE}) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Documented | |
@Component | |
public @interface Controller { | |
/** | |
* The value may indicate a suggestion for a logical component name, | |
* to be turned into a Spring bean in case of an autodetected component. | |
* @return the suggested component name, if any (or empty String otherwise) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target({ElementType.TYPE}) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Documented | |
@Component | |
public @interface Repository { | |
/** | |
* The value may indicate a suggestion for a logical component name, | |
* to be turned into a Spring bean in case of an autodetected component. | |
* @return the suggested component name, if any (or empty String otherwise) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { | |
return new PersistenceExceptionTranslationPostProcessor(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target(ElementType.TYPE) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Documented | |
@Indexed | |
public @interface Component { | |
/** | |
* The value may indicate a suggestion for a logical component name, | |
* to be turned into a Spring bean in case of an autodetected component. | |
* @return the suggested component name, if any (or empty String otherwise) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target({ElementType.TYPE}) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Documented | |
@Component | |
public @interface Service { | |
/** | |
* The value may indicate a suggestion for a logical component name, | |
* to be turned into a Spring bean in case of an autodetected component. | |
* @return the suggested component name, if any (or empty String otherwise) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class MyComponent { | |
/** | |
* Can able to directly mention the value inside @Value annotation | |
*/ | |
@Value("Hello Sample") | |
private String sampleValue; | |
/** | |
* the value for the property lici.value read from the application.properties file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lici.value=Hello Sample | |
lici.myproperty = Hello My Property | |
lici.array = First,Second,Third | |
lici.myrank = 4 | |
lici.underscore.values=A_B_C | |
lici.kevin.details={name: 'ajin', age: '23', country: 'india'} |