Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Cristian Romero Matesanz
    welcome to Spring boot chat!!!!Feel free to talk about this amazing Spring project
    anyone here?
    Jose A. IƱigo
    need help on spring boot unit testing...
    is it possible to use zuul and eureka server in spring mvc project without using spring cloud/spring boot..
    this spring mvc project already in production and right now i have to implement few rest service..
    your help is highly appreicated

    Hi, I am currently working on a spring mvc + hibernate application. It has Service and DAO layer.

    What I want to know is is there a way to archive dependent rollback among diffrent DAO implementation.

    for example is I add a entry/ row in table A mapped with Model A by using DAO implementation of A.
    then I am trying to do same for Table B. However while trying to same for Table C an errer occures
    then I wish to rollback both the changes done in Table A and Table B.

    Is there a way to archive this, any help is appriciated and thank you in advance :D

    how long it takes time to learn spring framework if you know hibernate
    the request in springmvc ,when get the content in request, we should use the getInputStream method
    Srikanth Machavaram
    How to get the client machine MAC Address Using java code spring mvc..???

    How to configure
    3.Maven and Repo
    in Windows 10

    for Spring MVC application

    hi am starter on spring boot kindly suggest me tutorial for spring boot as a biganers???
    Pawel Slowinski
    Hi everyone, I have a question regarding parameters for a function annotated with @RequestMapping.
    Is it possible to write converter which get all http header and return my internal class for me - I need more than one header here?
    I tried with the following converter:
    class HeaderToFlowConverter : Converter<HttpHeaders, FlowIdContext> {
    But it didn't work with function as below:
    fun test(@RequestHeader flowId2: FlowIdContext?)
    It seems that I can only write a converter which get a single header value (as a string), but I cannot find a way to get all headers as parameter
    @WebMvcTest(value = MessageIncomingController.class)
    public class MessageIncomingControllerTest {
    private static final String INCOMING_CHUANGLAN_URI = "/api/v1/message/vendor/incoming/chuanglan";
    private static final String INCOMING_TENCENT_URI = "/api/v1/message/vendor/incoming/tencent";
    private static final String INCOMING_TWILIO_URI = "/api/v1/message/vendor/incoming/twilio";
    private MockMvc mvc;
    private MessageIncomingService messageIncomingService;
    public void loopbackGenBlueStatusReport() throws Exception {
        MessageIncoming messageIncoming = new MessageIncoming(MessageVendorCode.CHUANG_LAN);
            .param("client_url", "client_url")
            .param("receiver", "receiver")
            .param("pswd", "pswd")
            .param("moTime", "180102030405")
            .param("mobile", "mobile")
            .param("msg", "msg")
            .param("destcode", "1")
            .param("spCode", "2")
            .param("notifyTime", "notifyTime")
            .param("isems", "0")
            .param("emshead", "1"))
    when run this controller test will get a exception :
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: At least one JPA metamodel must be present!
    How can i to do ?
    lor veasna
    Hello everyone in this group. Hope you fine and doing well. Can anyone guide me to configure swagger ui with spring mvc 3.1.4? I have tired a lot but still not work. please you help me . Thanks you!!
    Cristian Romero Matesanz
    @zhangzhenhuajack you are missing auto configure your database!!!!@WebMvcTest does not work well with multimodule approach
    Cristian Romero Matesanz
    hi @shels107 do you need help with the project?
    Asgar Javadov

    Hello! I'm having the same problem illustrated here.

    The problem is that the auto configuration is loaded into context but the addInterceptors method is not called. (I have put a log entry there, which doesn't appear when the app is started). However the WebMvcConfigurer exists in the list of them in the application context. What might be causing this issue?

    Cheikh Saadbouh

    I have a legacy springMvc project and i want to refactor all the controllers to return ResponseEntity<T> object rather then returning Model object which is returned by default.

    I am looking for a way to map functions in Map class to ResponseEntity<T> class .

    I have seen people recommend to use Regular expression as a solution to refactor all the methods.

    I need to know your opinion about implementing Regex as solution in terms of advantages / drawbacks for using regex in this scenario.

    In addition it would be helpful if you can suggest other solutions.

    please take a look at the attached code for more details.

    return Model object to the view

        public String getData(Model model) {
            model.addAttribute("message", "springMvc");
            return "viewPage";
        } ```

    return ResponseEntity object as a json format

        public ResponseEntity<Map<String,String>>  getData() {
            Map<String,String> map = new  HashMap<>();
            map.put("message", "springMvc");
            return  new ResponseEntity.Ok().body(map);
        } ```