daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Jan 20th, 2017 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. java.net.ConnectException: Connection refused: connect
  2.     at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[na:1.8.0_25]
  3.     at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) ~[na:1.8.0_25]
  4.     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) ~[na:1.8.0_25]
  5.     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_25]
  6.     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_25]
  7.     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_25]
  8.     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_25]
  9.     at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_25]
  10.    
  11. public class User {
  12.  
  13.     @Field
  14.     private String id;
  15.  
  16.     @Field
  17.     private String fName;
  18.  
  19.     @Field
  20.     private String lName;
  21.  
  22.     public String getId() {
  23.         return id;
  24.     }
  25.  
  26.     public void setId(String id) {
  27.         this.id = id;
  28.     }
  29.  
  30.     public String getfName() {
  31.         return fName;
  32.     }
  33.  
  34.     public void setfName(String fName) {
  35.         this.fName = fName;
  36.     }
  37.  
  38.     public String getlName() {
  39.         return lName;
  40.     }
  41.  
  42.     public void setlName(String lName) {
  43.         this.lName = lName;
  44.     }
  45. }
  46.    
  47. public interface UserDao extends SolrCrudRepository<User, Long> {
  48.  
  49. }
  50.    
  51. @RestController
  52. @RequestMapping("/app/api")
  53. public class UserController {
  54.  
  55.     @Autowired
  56.     private UserDao userDao;
  57.  
  58.     @RequestMapping(value = "/users", method = RequestMethod.GET)
  59.     public AjaxResponse loadAll() throws IOException {
  60.  
  61.         List<User> users = (List<User>) userDao.findAll();
  62.         return new AjaxResponse("Success", false, users);
  63.     }
  64. }
  65.    
  66. server.port=9111
  67.  
  68. spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  69. spring.datasource.url=jdbc:mysql://127.0.0.1:3306/solrDatabase?autoReconnect=true
  70. spring.datasource.username=root
  71. spring.datasource.password=root
  72.  
  73. spring.data.solr.host=http://localhost:8983/solr/
  74. spring.data.solr.repositories.enabled=true
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top