spring boot使用JPA,不采用 继承,运行报错求大神指导 50C

图片说明![图片说明](https://img-ask.csdn.net/upload/201710/20/1508462407_199217.png)图片说明

目录结构如上图所示,请问我应该怎么配置使用,扫描包需要配置子目录吗?
启动异常如下,求大神指点:
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-10-20 09:19:48.906 ERROR 13288 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Parameter 0 of constructor in org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration required a bean of type 'javax.sql.DataSource' that could not be found.
- Bean method 'dataSource' not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
- Bean method 'dataSource' not loaded because @ConditionalOnBean (types: org.springframework.boot.jta.XADataSourceWrapper; SearchStrategy: all) did not find any beans

Action:

Consider revisiting the conditions above or defining a bean of type 'javax.sql.DataSource' in your configuration.

4个回答

http://www.cnblogs.com/it you know /p/5891443.html

都说了不采用 继承JpaRepository,网上全是继承 JpaRepository教程,这个我知道,有大神指教下吗?

题主你的sql写错了,,,我试了一下,,可以这样查,,

     @PersistenceContext
    private EntityManager entityManager;

    @Test
    public void finAllUserNum() {
        String hql = "select id,name,num,other_str from user_num";
        Query query = entityManager.createQuery(hql);
        List<UserNum> testEntities = query.getResultList();
    }

【注意】,,select 后面的字段要和Entity,的属性对应,,

有问题还可以追问。。我刚刚测了完美通过

Small_Mouse0
小鼠标丶 回复zhegui7212: qq1486145487
2 年多之前 回复
zhegui7212
zhegui7212 我的问题是启动报错了,如何解决,可以留QQ吗,我发给你,帮我修改下
2 年多之前 回复

已解决,是maven下载的jar有问题,可能网络不好,重新再springboot官网导入相同版本项目,发现好几个jar存在却报错,删除了重新maven update,另外实体类主键写错了,话你是不细心@Entity
@Table(name = "t_test")

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
spring boot和jpa结合时报错 麻烦大神帮忙调一下 并说明错在哪
https://pan.baidu.com/s/1hsy1mde 提取密码 p7ju 编码环境 Intel idea 本来也想把代码粘出来 可是太长了 真的是没办法 跳了一天了还是解决不了 麻烦大神帮忙 感激不尽 主要报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.service.RedisStatusService com.example.controller.RedisController.redisStatusService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisStatusService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.dao.RedisPortInfoDao com.example.service.RedisStatusService.redisPortInfoDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisStatusService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.dao.RedisPortInfoDao com.example.service.RedisStatusService.redisPortInfoDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo!
刚开始使用jpa,不知道继承JpaRepository和使用entitymanager该如何取舍
如题,刚刚接触spring boot+jpa,就在网上查阅资料,看到的demo大多分为两种,继承JpaRepository和使用entitymanager,但是弄了半天没弄明白这两者的区别和各自的用途,求大神帮我详细解释一下,顺带给我一个demo让我进一步学习一下。
spring boot 与jpa结合的过程中出现问题,但刚接触不知道问题在哪,麻烦大神指点,十分感谢
``` @Controller public class RedisController { @Autowired private RedisStatusService redisStatusService; @RequestMapping("") public String index(HttpServletResponse response) { //重定向到 /index return response.encodeRedirectURL("/index"); } @RequestMapping(value = "/showredisstutas" , method = RequestMethod.GET) public String addCourse(HttpServletResponse response, HttpSession session,@RequestParam(value = "ipadd") String ipadd, @RequestParam(value = "port") String port){ Iterable<RedisStatus> list=redisStatusService.getRedisStatusInfo(ipadd,port); session.setAttribute("statuslist",list); return response.encodeRedirectURL("/showRedisStatus"); } } ``` ```public class RedisStatusService { /* @Resource RedisStatusDao redisStutasDao; @Resource RedisPortInfoDao redisPortInfoDao;*/ @Autowired private RedisPortInfoDao redisPortInfoDao; @Autowired private RedisStatusDao redisStutasDao; public Iterable<RedisStatus> getRedisStatusInfo(String ip,String port){ Iterable<RedisStatus> list=null; try { RedisPortInfo rpi=redisPortInfoDao.findByRedis_ipAndRedis_port(ip,port); if(rpi!=null){ list = new ArrayList<RedisStatus>(); list = redisStutasDao.findByRedis_idOrderByRecoder_timeDesc(rpi.getRedis_port_id()); }else{ list=null; } }catch (Exception ee){ list=null; } return list; } } ``` ```public interface RedisPortInfoDao extends CrudRepository<RedisPortInfo, String> { public RedisPortInfo findByRedis_ipAndRedis_port(String redis_ip,String redis_port); } ``` ``` @Entity @Table(name = "redis_port_info") public class RedisPortInfo { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "redis_port_id") private int redis_port_id; @Column(name = "redis_ip") private String redis_ip; @Column(name = "redis_port") private int redis_port; @Column(name = "redis_name") private String redis_name; @Column(name = "slowlog_lastid") private int slowlog_lastid; public int getRedis_port_id() { return redis_port_id; } public void setRedis_port_id(int redis_port_id) { this.redis_port_id = redis_port_id; } public String getRedis_ip() { return redis_ip; } public void setRedis_ip(String redis_ip) { this.redis_ip = redis_ip; } public int getRedis_port() { return redis_port; } public void setRedis_port(int redis_port) { this.redis_port = redis_port; } public String getRedis_name() { return redis_name; } public void setRedis_name(String redis_name) { this.redis_name = redis_name; } public int getSlowlog_lastid() { return slowlog_lastid; } public void setSlowlog_lastid(int slowlog_lastid) { this.slowlog_lastid = slowlog_lastid; } } ``` 以下是报错信息 ``` org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.service.RedisStatusService com.example.controller.RedisController.redisStatusService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisStatusService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.dao.RedisPortInfoDao com.example.service.RedisStatusService.redisPortInfoDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.service.RedisStatusService com.example.controller.RedisController.redisStatusService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisStatusService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.dao.RedisPortInfoDao com.example.service.RedisStatusService.redisPortInfoDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisStatusService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.dao.RedisPortInfoDao com.example.service.RedisStatusService.redisPortInfoDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.example.dao.RedisPortInfoDao com.example.service.RedisStatusService.redisPortInfoDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisPortInfoDao': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! Caused by: org.springframework.data.mapping.PropertyReferenceException: No property redis found for type RedisPortInfo! ``` 麻烦大神帮忙找出问题
springboot2.1.4 + jpa + hibernate 使用aop注解形式实现多数据源管理 可能懒加载出现问题求大神解答
最近项目中使用springboot2.1.4 + jpa + hibernate 使用aop注解形式实现多数据源管理,用的就是网上大多数人使用的一套代码,但是我在项目中使用后发现如果配置 spring配置文件 application.yml 中open-in-view: false 跨数据源查询正常,但是保存或者修改失败原因是事务没有提交,一旦把open-in-view改成true则不能跨数据源查询,修改保存正常事务正常提交求解,具体代码如下实现 1. application.yml ``` spring: ## 数据库配置 #datasource: #driver-class-name: com.mysql.jdbc.Driver #url: jdbc:mysql://192.168.101.125:3306/cdv?useSSL=false&characterEncoding=utf-8 #username: root #password: 123456 #url: jdbc:mysql://127.0.0.1:3306/boot-jpa-back-sys2?useSSL=false&characterEncoding=utf-8 #username: root #password: datasource: test1: driver-class-name: com.mysql.jdbc.Driver jdbc-url: jdbc:mysql://192.168.101.125:3306/cdv?useSSL=false&characterEncoding=utf-8 username: root password: 123456 type: com.alibaba.druid.pool.DruidDataSource test2: driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc-url: jdbc:sqlserver://192.168.101.125:1433;database=Test; username: sa password: Zqvideo123 type: com.alibaba.druid.pool.DruidDataSource ## jpa配置 jpa: show-sql: true hibernate: #ddl-auto: update properties: hibernate.dialect: com.common.mysql.MySQLDialectUTF8 hibernate.format_sql: false open-in-view: false ``` DataSourceAsepct ``` package com.common.db; import java.lang.reflect.Method; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @Aspect @Component @Order(0) public class DataSourceAsepct { //加载数据源 @Pointcut("@annotation(com.common.db.DataSourceSet)") // @AfterThrowing(pointcut="@annotation(com.common.db.DataSource)", throwing= "error") public void pointCut(){ } @Before("pointCut()") public void before(JoinPoint joinPoint) { Object target = joinPoint.getTarget(); MethodSignature signature = (MethodSignature) joinPoint.getSignature(); DataSourceEnum dataSource = DataSourceEnum.DEFAULT; try { Method method = target.getClass().getMethod(signature.getName(), signature.getParameterTypes()); if (method.isAnnotationPresent(DataSourceSet.class)) { DataSourceSet annotation = method.getAnnotation(DataSourceSet.class); dataSource = annotation.value(); } } catch (NoSuchMethodException e) { e.printStackTrace(); } //实现aop切换数据源 System.out.println("aop切换数据源:" + dataSource.getName()); DataSourceHolder.setDataSource(dataSource); } // @After("pointCut()") @AfterThrowing(pointcut="@annotation(com.common.db.DataSourceSet)", throwing= "error") public void after() { DataSourceHolder.clearDataSource(); String v = DataSourceHolder.getDataSource(); System.out.println(v); } } ``` DataSourceConfig ``` package com.common.db; import java.util.HashMap; import java.util.Map; import javax.sql.DataSource; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.jdbc.DataSourceBuilder; import org.springframework.boot.jta.atomikos.AtomikosDataSourceBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.jta.JtaTransactionManager; @Configuration public class DataSourceConfig { //连接数据库db1 @Bean("test1") @ConfigurationProperties("spring.datasource.test1") public DataSource test1() { return DataSourceBuilder.create().build(); } //连接数据库db2 @Bean("test2") @ConfigurationProperties("spring.datasource.test2") public DataSource test2() { return DataSourceBuilder.create().build(); } @Bean("dynamicDataSource") @Primary public DataSource dynamicDataSource() { DynamicDataSource dataSource = new DynamicDataSource(); dataSource.setDefaultTargetDataSource(test1()); Map<Object, Object> dataSourceMap = new HashMap<>(2); dataSourceMap.put(DataSourceEnum.TEST1.getName(), test1()); dataSourceMap.put(DataSourceEnum.TEST2.getName(), test2()); dataSource.setTargetDataSources(dataSourceMap); return dataSource ; } @Bean public PlatformTransactionManager transactionManager() { return new DataSourceTransactionManager(dynamicDataSource()); } } ``` DataSourceEnum ``` package com.common.db; import lombok.AllArgsConstructor; import lombok.Getter; @AllArgsConstructor @Getter public enum DataSourceEnum { DEFAULT("test1"), TEST1("test1"), TEST2("test2"); private String name; } ``` DataSourceHolder ``` package com.common.db; public class DataSourceHolder { private static final ThreadLocal<String> DS_HOLDER = new ThreadLocal<>(); public static void setDataSource(DataSourceEnum dataSource) { DS_HOLDER.set(dataSource.getName()); } public static String getDataSource() { return DS_HOLDER.get(); } public static void clearDataSource() { DS_HOLDER.remove(); } } ``` DataSourceSet ``` package com.common.db; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @Documented public @interface DataSourceSet { //枚举 DataSourceEnum value(); } ``` DynamicDataSource ``` package com.common.db; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; public class DynamicDataSource extends AbstractRoutingDataSource { @Override protected Object determineCurrentLookupKey() { //基于aop切换数据源 System.out.println("dynamic datasource 切换数据源" + DataSourceHolder.getDataSource()); return DataSourceHolder.getDataSource(); } } ``` 测试调用 ``` server层 @Override @DataSourceSet(DataSourceEnum.TEST1) public String test1(Long id) { String s = programRepository.findids(id); System.out.println(s); return s; } @Override @DataSourceSet(DataSourceEnum.TEST2) public String test2(Long id) { String s = testRepository.findids1(id); System.out.println(s); return s; } ``` ``` Controller层 @PostMapping("/test") @ResponseBody public ResultVo test(Long id) { id = 1l; String beProgram1 = programService.test1(id); System.out.println(222); id=2l; String beProgram = testService.test2(id); System.out.println(333); return ResultVoUtil.success(beProgram+beProgram1); } ```
[大神求救]使用jpa查询问题?采用?1占位,数字连续就没有问题,只要中间有间隔就会报错!
采用?1 占位,数字连续就没有问题,只要中间有间隔就会报错! org.hibernate.QueryException: Unexpected gap in ordinal parameter labels [2 -> 5] : [1,2,5] at org.hibernate.query.internal.ParameterMetadataImpl.<init>(ParameterMetadataImpl.java:63) at org.hibernate.engine.query.internal.NativeQueryInterpreterStandardImpl.getParameterMetadata(NativeQueryInterpreterStandardImpl.java:33) at org.hibernate.engine.query.spi.QueryPlanCache.getSQLParameterMetadata(QueryPlanCache.java:128) at org.hibernate.internal.AbstractSharedSessionContract.getNativeQueryImplementor(AbstractSharedSessionContract.java:1006) at org.hibernate.internal.AbstractSharedSessionContract.createNativeQuery(AbstractSharedSessionContract.java:931) at org.hibernate.internal.AbstractSessionImpl.createNativeQuery(AbstractSessionImpl.java:23) at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:350) at com.sun.proxy.$Proxy144.createNativeQuery(Unknown Source) at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:308) at com.sun.proxy.$Proxy144.createNativeQuery(Unknown Source) at com.ecoop.dao.impl.BaseDaoImpl.findBySQLNoRefresh(BaseDaoImpl.java:262) at com.ecoop.dao.impl.BaseDaoImpl.findBySQL(BaseDaoImpl.java:256) at com.ecoop.dao.impl.BaseDaoImpl$$FastClassBySpringCGLIB$$67e75078.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) at com.ecoop.dao.impl.BaseDaoImpl$$EnhancerBySpringCGLIB$$ec8383cb.findBySQL(<generated>) at com.ecoop.query.bo.impl.WorkbenchInquiryBoImpl.executionQuery(WorkbenchInquiryBoImpl.java:124) at com.ecoop.query.bo.impl.WorkbenchInquiryBoImpl.countContractByConditions(WorkbenchInquiryBoImpl.java:46) at com.ecoop.query.bo.impl.WorkbenchInquiryBoImpl$$FastClassBySpringCGLIB$$22b2de71.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) at com.ecoop.query.bo.impl.WorkbenchInquiryBoImpl$$EnhancerBySpringCGLIB$$704e3156.countContractByConditions(<generated>) at com.ecoop.query.serivce.impl.WorkbenchInquiryServiceImpl.listContractToBeProcessed(WorkbenchInquiryServiceImpl.java:32) at com.ecoop.query.controller.WorkbenchInquiryController.countContractByConditions(WorkbenchInquiryController.java:36) at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
spring boot 集成dubbox项目部署到tomcat下报错
2016-05-31 17:16:29 [ localhost-startStop-1:5445 ] - [ INFO ] org.springframework.cache.ehcache.EhCacheManagerFactoryBean.destroy(EhCacheManagerFactoryBean.java:181) Shutting down EhCache CacheManager 2016-05-31 17:16:29 [ localhost-startStop-1:5458 ] - [ ERROR ] org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:825) Application startup failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduledTasks': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.itanbank.admin.service.ItbCompanyService com.itanbank.admin.config.ScheduledTasks.itbCompanyService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itbCompanyServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.itanbank.admin.repository.web.ItbCompanyRepository com.itanbank.admin.service.ItbCompanyServiceImpl.itbCompanyRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itbCompanyRepository': Cannot create inner bean '(inner bean)#7623d14e' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#7623d14e': Cannot resolve reference to bean 'webEntityManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webEntityManager': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.itanbank.admin.service.InvestFinishService': Cannot resolve reference to bean 'investFinishServiceImpl' while setting bean property 'ref'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'investFinishServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.itanbank.admin.repository.web.ItbTrafficGiveRepository com.itanbank.admin.service.InvestFinishServiceImpl.itbTrafficGiveRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itbTrafficGiveRepository': Cannot create inner bean '(inner bean)#4f762393' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#4f762393': Cannot resolve reference to bean 'webEntityManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webEntityManager': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.itanbank.admin.service.RegisterFinishService': Cannot resolve reference to bean 'registerFinishServiceImpl' while setting bean property 'ref'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registerFinishServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.itanbank.admin.repository.web.ItbFriendInviteRepository com.itanbank.admin.service.RegisterFinishServiceImpl.itbFriendInviteRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itbFriendInviteRepository': Cannot create inner bean '(inner bean)#403e1ecb' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#403e1ecb': Cannot resolve reference to bean 'webEntityManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webEntityManager': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.itanbank.admin.service.BindBankFinishService': Cannot resolve reference to bean 'bindBankFinishServiceImpl' while setting bean property 'ref'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bindBankFinishServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.itanbank.admin.repository.web.ItbTrafficGiveRepository com.itanbank.admin.service.BindBankFinishServiceImpl.itbTrafficGiveRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itbTrafficGiveRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Repository interface must not be null on initialization! at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:764) at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:357) at org.springframework.boot.SpringApplication.run(SpringApplication.java:305) at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:149) at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:129) at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:85) at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5183) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 目前问题已有解决方案,简单描述下问题:dubbo的多个接口实现类中引用了相同的业务对象dao。把dao封装成service后注入问题就没有出现了。 但是实际问题还没有解决,求大神解答。
Cannot load driver class: com.mysql.jdbc.Driver
各位大神 我使用spring-boot,maven管理项目,在pom中添加mysql依赖包后再添加jpa依赖包就报错:Caused by: java.lang.IllegalStateException: Cannot load driver class: com.mysql.jdbc.Driver
spring boot service接口问题
报错:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'girlController': Unsatisfied dependency expressed through field 'girlRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'girlRepository': Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType; GirlRepository: import org.springframework.data.jpa.repository.JpaRepository; public interface GirlRepository extends JpaRepository<Girl, Integer> { } GirlController: import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController public class GirlController { @Autowired private GirlRepository girlRepository; @GetMapping(value = "/girls") public List<Girl> girlList(){ return girlRepository.findAll(); } } 求大神帮忙看看哪里的问题啊?
springboot项目创建entityManagerFactory时出错:Error activating Bean Validation integration,如何解决?
在svn上拉下项目来本地时无法开启项目,包和配置都和别人一样,但是别人能启动,项目是springboot2.1.9+JPA+mybatis-plus+mysql+oracle+application.properties 所有配置都写到了application.propertiese中 麻烦熟悉JPA的entityManagerFactory生命周期的大神们帮忙解决下,感激不 尽。 鄙人已尝试过的操作: * 1检查实体类与数据库的字段是否匹配,换springboot的版本。 * 2 重新倒jar包、挂上@Entity @ID @GeneratedValue 、重写get set方法、import javax.persistence.Id。 * 3倒入各种hibernate相关的包和javassist包,换mave版本,重新开maven库单独下载包 具体错误如下 ``` org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105) ~[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at com.south.robot.RobotApplication.main(RobotApplication.java:13) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.9.RELEASE.jar:2.1.9.RELEASE] ```
SpringBoot入门练习,自动注入无法创建实现类,求大神解答。
下面是报错 ``` org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.syl.dao.UserDao com.syl.service.impl.UserServiceImpl.userdao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Cannot create inner bean '(inner bean)#77f70c36' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#77f70c36': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at com.syl.SpringBootApplicationRunner.main(SpringBootApplicationRunner.java:8) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-1.3.5.RELEASE.jar:1.3.5.RELEASE] Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.syl.dao.UserDao com.syl.service.impl.UserServiceImpl.userdao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Cannot create inner bean '(inner bean)#77f70c36' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#77f70c36': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] ... 22 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Cannot create inner bean '(inner bean)#77f70c36' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#77f70c36': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] ... 24 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#77f70c36': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:634) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:444) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:299) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] ... 37 common frames omitted Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:698) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1175) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] ... 45 common frames omitted ``` 以下是项目结构 ![图片说明](https://img-ask.csdn.net/upload/201907/09/1562648421_187395.png)
gradle+spring boot+mybatis+PageHelper 分页无效
被折磨了一天,网上也找了很多解决办法,都不行,求助大神 如果PageHelper 降版本到4.0的话,PageInfo里的属性就全是空的, 直接用PageHelper.startPage(1, 2); 也没用。 ,不废话,直接上代码。 测试类: ``` @RunWith(SpringRunner.class) @SpringBootTest public class UserMappertest { @Autowired private UserMapper userMapper; @Test public void getAllByPage(){ Map<String,Object> map = new HashMap<String,Object>(); map.put("email", "a"); // map.put("id", "2"); PageHelper.startPage(1, 2,true);// 默认从第一页开始,每页五条 List<Map<String,Object>> users = userMapper.getAllByPage(map); PageInfo<Map<String,Object>> pageBlog = new PageInfo<Map<String,Object>>(users);// 将查出来的blogArticleList绑定到pageInfo中 System.out.println(">======page====>"+pageBlog.toString()); int a = 1; for(Map<String,Object> m:users) { System.out.println(">============users===a====>"+a); System.out.println(">============users===username====>"+m.get("username")); a++; } } } ``` 输出结果: ``` >======page====>PageInfo{pageNum=1, pageSize=7, size=7, startRow=0, endRow=6, total=7, pages=1, list=[{password=$76NoUnuTJ8iAtKIUi, name=qweq,id=1, avatar=//localhost:8081/view/5a9f9509c99a7138a8ea306c, email=i@om, username=admin}, {password=$2a$IUi, name=Wu, id=2, avatar=//localhost:8081/view/5a9f962ec99a7138a8ea306d, email=wa@wa.com, username=wau}, {password=$2a$1O7s3Jo4XW, name=是释放, id=3, avatar=//localhost:8081/view/5a9f9684c99a7138a8ea306e, email=12321@sfa.cn, username=wjy0703}, {password=123456, name=fs士大夫撒, id=4, avatar=//localhost:8081/view/5aa777c3c99a715b60793591, email=safdaf@ssfdsa.com, username=wjy}, {password=$2EXdOSDS, name=发大好时光, id=6, avatar=//localhost:8081/view/5aa77a8cc99a715b60793592, email=123212@sfa.cn, username=wjiyu}, {password=123456, name=搭顺风很舒服, id=7, email=safdafaaa@ssfdsa.com, username=qwe123}, {password=$2QB6cdbsAySst80C9FS, name=safddasfa, id=9, email=fas2f@sfa.com, username=abc123}], prePage=0, nextPage=0, isFirstPage=true, isLastPage=true, hasPreviousPage=false, hasNextPage=false, navigatePages=8, navigateFirstPage=1, navigateLastPage=1, navigatepageNums=[1]} >============users===a====>1 >============users===username====>admin >============users===a====>2 >============users===username====>waylau >============users===a====>3 >============users===username====>wjy0703 >============users===a====>4 >============users===username====>wjy >============users===a====>5 >============users===username====>wayu >============users===a====>6 >============users===username====>qwe123 >============users===a====>7 >============users===username====>abc123 ``` gradle配置 springBootVersion = '1.5.2.RELEASE': ``` // 添加 MySQL连接驱动 的依赖 compile('mysql:mysql-connector-java:6.0.5') // 添加 Apache Commons Lang 依赖 compile('org.apache.commons:commons-lang3:3.5') //mybatis依赖 compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.0') //pagehelper依赖 compile('com.github.pagehelper:pagehelper:5.1.2') ``` mybatis-config.xml 配置: 下面使用"com.github.pagehelper.PageHelper"也不行,都不报错,也不能分页。 ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <typeAliases> <typeAlias alias="Integer" type="java.lang.Integer" /> <typeAlias alias="Long" type="java.lang.Long" /> <typeAlias alias="HashMap" type="java.util.HashMap" /> <typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" /> <typeAlias alias="ArrayList" type="java.util.ArrayList" /> <typeAlias alias="LinkedList" type="java.util.LinkedList" /> </typeAliases> <plugins> <plugin interceptor="com.github.pagehelper.PageInterceptor"> </plugin> </plugins> </configuration> ``` application.properties 配置: ``` #Thymeleaf spring.thymeleaf.encoding=UTF-8 #热部署静态文件 spring.thymeleaf.cache=false #使用HTML5标准 spring.thymeleaf.mode=HTML5 #DataSource spring.datasource.url=jdbc:mysql://localhost/boot?useSSL=false&serverTimezone=UTC&characterEncoding=utf-8 spring.datasource.username=boot spring.datasource.password=boot spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # mybatis配置 mybatis.config-location=classpath:mybatis-config.xml // 配置文件位置 mybatis.typeAliasesPackage=com.educate.domain mybatis.mapper-locations=classpath:com/educate/mapper/**/*.xml mybatis.config-locations=classpath:mybatis/mybatis-config.xml #pagehelper分页插件配置 pagehelper.helperDialect=mysql pagehelper.reasonable=true pagehelper.supportMethodsArguments=true #JPA spring.jpa.show-sql=true spring.jpa.hibernate.ddl-auto=update ``` UserMapper.xml 配置: ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <mapper namespace="com.educate.mapper.user.UserMapper" > <sql id="Base_Column_List" > id,name, username, password, email,avatar </sql> <sql id="Base_Column_Where" > where 1=1 <if test="id != null"> and id=#{id}</if> <if test="name != null"> and name like '%${name}%'</if> <if test="email != null"> and email like '%${email}%'</if> </sql> <select id="getAll" resultType="java.util.HashMap" parameterType="java.util.HashMap"> SELECT <include refid="Base_Column_List" /> FROM user <include refid="Base_Column_Where" /> </select> <select id="getAllByPage" resultType="java.util.HashMap"> SELECT <include refid="Base_Column_List" /> FROM user <include refid="Base_Column_Where" /> </select> </mapper> ``` UserMapper 代码: ``` @Mapper public interface UserMapper { List<Map<String,Object>> getAll(Map<String,Object> map); List<Map<String,Object>> getAllByPage(Map<String,Object> page); } ```
一个java框架搭建问题
http://blog.csdn.net/yangyang2183/article/details/51994823参考这篇博文里项目框架搭建的目录。搭建n遍都不一样。请求大神。。。目前想用spring mvc + spring boot + spring data jpa和angularjs可加我Q1974809523联系,谢谢,急需,跪求
eclipse启动项目的时候报错,然后重启好多次中会有几次是好着的,闹不懂什么意思,配置文件都是对的
五月 21, 2019 10:58:55 上午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [jar:file:/D:/workSpace/zhzf3.2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cats-case-web-zhzf/WEB-INF/lib/cats-core-impl-3.2.0.jar!/config/spring/applicationContext-resource.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: com.catsic.jpa] Unable to build Hibernate SessionFactory     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583)     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)     at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:858)     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)     at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748) Caused by: javax.persistence.PersistenceException: [PersistenceUnit: com.catsic.jpa] Unable to build Hibernate SessionFactory     at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:967)     at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:892)     at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:151)     at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:358)     at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:384)     at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:373)     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1763)     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1700)     ... 21 more Caused by: org.hibernate.exception.GenericJDBCException: Unable to release JDBC Connection used for DDL execution     at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)     at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)     at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)     at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.release(DdlTransactionIsolatorNonJtaImpl.java:86)     at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:137)     at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:183)     at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)     at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:313)     at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)     at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:889)     ... 27 more Caused by: java.sql.SQLException: Already closed.     at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114)     at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)     at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.closeConnection(DatasourceConnectionProviderImpl.java:127)     at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.releaseConnection(JdbcEnvironmentInitiator.java:185)     at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.release(DdlTransactionIsolatorNonJtaImpl.java:83)     ... 33 more 五月 21, 2019 10:58:55 上午 org.apache.catalina.core.ApplicationContext log 信息: Set web app root system property: 'zhzf.root' = [D:\workSpace\zhzf3.2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cats-case-web-zhzf\] 五月 21, 2019 10:58:55 上午 org.apache.catalina.core.ApplicationContext log 信息: Removing all previous handlers for JUL to SLF4J bridge   求各位大神帮助,这种问题怎么解决,eclipse有的时候能运行,有的时候运行不了,配置文件什么的都是对的,实在找不到问题出在哪里了,clean, maven update都已经试过很多遍了,也是时好时坏的 --------------------- 作者:不要慌,我们能赢 来源:CSDN 原文:https://blog.csdn.net/aaa948771854/article/details/90402985 版权声明:本文为博主原创文章,转载请附上博文链接!
求熟悉套接字和springboot的大神帮忙
小白一只 刚刚入门 intellij装上了之后报了一大堆错 别人已经调通的程序放上来无法运行 求助~~~~~ ![图片说明](https://img-ask.csdn.net/upload/201711/13/1510563392_246803.png) "C:\Program Files (x86)\Java\jdk1.8.0_65\jre\bin\java" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10583 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.2.5\lib\idea_rt.jar=10584:C:\Program Files\JetBrains\IntelliJ IDEA 2017.2.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\deploy.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\access-bridge-32.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\cldrdata.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\dnsns.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\jaccess.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\jfxrt.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\localedata.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\nashorn.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\sunec.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\sunjce_provider.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\sunmscapi.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\sunpkcs11.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext\zipfs.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\javaws.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\jfr.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\jfxswt.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\management-agent.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\plugin.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\rt.jar;F:\demo\target\classes;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\1.5.8.RELEASE\spring-boot-starter-data-jpa-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter\1.5.8.RELEASE\spring-boot-starter-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot\1.5.8.RELEASE\spring-boot-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.8.RELEASE\spring-boot-autoconfigure-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-logging\1.5.8.RELEASE\spring-boot-starter-logging-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;C:\Users\Administrator\.m2\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;C:\Users\Administrator\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\Administrator\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;C:\Users\Administrator\.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-aop\1.5.8.RELEASE\spring-boot-starter-aop-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-aop\4.3.12.RELEASE\spring-aop-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\1.5.8.RELEASE\spring-boot-starter-jdbc-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\tomcat-jdbc\8.5.23\tomcat-jdbc-8.5.23.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\tomcat-juli\8.5.23\tomcat-juli-8.5.23.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-jdbc\4.3.12.RELEASE\spring-jdbc-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\hibernate\hibernate-core\5.0.12.Final\hibernate-core-5.0.12.Final.jar;C:\Users\Administrator\.m2\repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;C:\Users\Administrator\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar;C:\Users\Administrator\.m2\repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;C:\Users\Administrator\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\Administrator\.m2\repository\org\jboss\jandex\2.0.0.Final\jandex-2.0.0.Final.jar;C:\Users\Administrator\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\Administrator\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;C:\Users\Administrator\.m2\repository\org\hibernate\hibernate-entitymanager\5.0.12.Final\hibernate-entitymanager-5.0.12.Final.jar;C:\Users\Administrator\.m2\repository\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;C:\Users\Administrator\.m2\repository\org\springframework\data\spring-data-jpa\1.11.8.RELEASE\spring-data-jpa-1.11.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\data\spring-data-commons\1.13.8.RELEASE\spring-data-commons-1.13.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-orm\4.3.12.RELEASE\spring-orm-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-context\4.3.12.RELEASE\spring-context-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-tx\4.3.12.RELEASE\spring-tx-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-beans\4.3.12.RELEASE\spring-beans-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-aspects\4.3.12.RELEASE\spring-aspects-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-web\1.5.8.RELEASE\spring-boot-starter-web-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.8.RELEASE\spring-boot-starter-tomcat-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.23\tomcat-embed-core-8.5.23.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\tomcat-annotations-api\8.5.23\tomcat-annotations-api-8.5.23.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.23\tomcat-embed-el-8.5.23.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.23\tomcat-embed-websocket-8.5.23.jar;C:\Users\Administrator\.m2\repository\org\hibernate\hibernate-validator\5.3.5.Final\hibernate-validator-5.3.5.Final.jar;C:\Users\Administrator\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-web\4.3.12.RELEASE\spring-web-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-webmvc\4.3.12.RELEASE\spring-webmvc-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-expression\4.3.12.RELEASE\spring-expression-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-web-services\1.5.8.RELEASE\spring-boot-starter-web-services-1.5.8.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-oxm\4.3.12.RELEASE\spring-oxm-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\ws\spring-ws-core\2.4.0.RELEASE\spring-ws-core-2.4.0.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\ws\spring-xml\2.4.0.RELEASE\spring-xml-2.4.0.RELEASE.jar;C:\Users\Administrator\.m2\repository\mysql\mysql-connector-java\5.1.44\mysql-connector-java-5.1.44.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-core\4.3.12.RELEASE\spring-core-4.3.12.RELEASE.jar;C:\Users\Administrator\.m2\repository\io\springfox\springfox-swagger2\2.2.2\springfox-swagger2-2.2.2.jar;C:\Users\Administrator\.m2\repository\org\mapstruct\mapstruct\1.0.0.CR1\mapstruct-1.0.0.CR1.jar;C:\Users\Administrator\.m2\repository\io\swagger\swagger-annotations\1.5.3\swagger-annotations-1.5.3.jar;C:\Users\Administrator\.m2\repository\io\swagger\swagger-models\1.5.3\swagger-models-1.5.3.jar;C:\Users\Administrator\.m2\repository\io\springfox\springfox-spi\2.2.2\springfox-spi-2.2.2.jar;C:\Users\Administrator\.m2\repository\io\springfox\springfox-core\2.2.2\springfox-core-2.2.2.jar;C:\Users\Administrator\.m2\repository\io\springfox\springfox-schema\2.2.2\springfox-schema-2.2.2.jar;C:\Users\Administrator\.m2\repository\io\springfox\springfox-swagger-common\2.2.2\springfox-swagger-common-2.2.2.jar;C:\Users\Administrator\.m2\repository\io\springfox\springfox-spring-web\2.2.2\springfox-spring-web-2.2.2.jar;C:\Users\Administrator\.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\Administrator\.m2\repository\org\aspectj\aspectjrt\1.8.11\aspectjrt-1.8.11.jar;C:\Users\Administrator\.m2\repository\org\aspectj\aspectjweaver\1.8.11\aspectjweaver-1.8.11.jar;C:\Users\Administrator\.m2\repository\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\hateoas\spring-hateoas\0.23.0.RELEASE\spring-hateoas-0.23.0.RELEASE.jar;C:\Users\Administrator\.m2\repository\io\springfox\springfox-swagger-ui\2.2.2\springfox-swagger-ui-2.2.2.jar;C:\Users\Administrator\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar" com.example.demo.DemoApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.8.RELEASE) 2017-11-13 17:00:59.166 INFO 5480 --- [ main] com.example.demo.DemoApplication : Starting DemoApplication on DESKTOP-9J760FU with PID 5480 (F:\demo\target\classes started by Administrator in F:\demo) 2017-11-13 17:00:59.166 INFO 5480 --- [ main] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default 2017-11-13 17:00:59.260 INFO 5480 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1d3b207: startup date [Mon Nov 13 17:00:59 CST 2017]; root of context hierarchy 2017-11-13 17:01:01.197 INFO 5480 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$9576969d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2017-11-13 17:01:01.291 INFO 5480 --- [ main] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0] 2017-11-13 17:01:01.369 INFO 5480 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$f0ded19e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
application.yml 配置sqlserver出错
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>sqljdbc4</artifactId> </dependency> application.yml 配置 datasource: driver-class-name: com.**microsoft.sqlserver.jdbc.SQLServerDriver** url: jdbc:sqlserver://localhost:1433;DatabaseName=KEM username: sa password: ErpUiot7890 问题: driver-class-name: com.**microsoft.sqlserver.jdbc.SQLServerDriver** com.后面飘红。 请大神解决下
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
redis分布式锁,面试官请随便问,我都会
文章有点长并且绕,先来个图片缓冲下! 前言 现在的业务场景越来越复杂,使用的架构也就越来越复杂,分布式、高并发已经是业务要求的常态。像腾讯系的不少服务,还有CDN优化、异地多备份等处理。 说到分布式,就必然涉及到分布式锁的概念,如何保证不同机器不同线程的分布式锁同步呢? 实现要点 互斥性,同一时刻,智能有一个客户端持有锁。 防止死锁发生,如果持有锁的客户端崩溃没有主动释放锁,也要保证锁可以正常释...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法和技巧,包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等,会持续更新......
YouTube排名第一的励志英文演讲《Dream(梦想)》
Idon’t know what that dream is that you have, I don't care how disappointing it might have been as you've been working toward that dream,but that dream that you’re holding in your mind, that it’s po...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Java世界最常用的工具类库
Apache Commons Apache Commons有很多子项目 Google Guava 参考博客
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC...
8年经验面试官详解 Java 面试秘诀
作者 |胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。 Java程序员准备和投递简历的实...
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车?某胡同口的煎饼摊一年能卖出多少个煎饼?深圳有多少个产品经理?一辆公交车里能装下多少个乒乓球?一个正常成年人有多少根头发?这类估算问题,被称为费米问题,是以科学家费米命名的。为什么面试会问这种问题呢?这类问题能把两类人清楚地区分出来。一类是具有文科思维的人,擅长赞叹和模糊想象,它主要依靠的是人的第一反应和直觉,比如小孩...
相关热词 c# clr dll c# 如何orm c# 固定大小的字符数组 c#框架设计 c# 删除数据库 c# 中文文字 图片转 c# 成员属性 接口 c#如何将程序封装 16进制负数转换 c# c#练手项目
立即提问